You can use this query in mysql:
SELECT CONCAT(json_object('name', name, 'phone', phone),",")
FROM person;
It will return something like this:
{"name": "John", "phone": "123"},
{"name": "John2", "phone": "123456"},
So you just add the rest of the format of JSON:
{
"person":
[
{"name": "John", "phone": "123"},
{"name": "John2", "phone": "123456"}
]
}
And that's it, you can import to firebase