As of Firefox 80, there is an option to import login data from CSV files (thanks Mozilla!):
https://support.mozilla.org/en-US/kb/import-login-data-file
The CSV file should follow the structure as indicated in the linked article, but I had no problem importing Chrome login data, which used a slightly different structure. If there is a problem importing from a source with a different structure then it should not be difficult to manipulate it using a spreadsheet program.