I have one react native app the shows some ingredients and the user can select some of it to filter one specific recipe and see all the details, my doubt is, how can I convert the Array of ingredient objects to an Array of "names" and send it via Axios?
Array of objects I am receiving from the API:
Array [
Object {
"id": 8,
"isSelected": true,
"name": "leite condensado",
},
Object {
"id": 9,
"isSelected": true,
"name": "creme de leite",
},
]
and the API expect something like
/report?name='suco de limão', 'bolacha'
So, I need to extract only the values from the name Key, as Array.
Anyone knows if I can do it in the front to keep the API without any update?