I have array of object with same key name. I want to pass each address
key inside that object as parameter to my api. How I can do this ? I get response like this { '0': { address: 'abcd' }, '1': { address: 'xyz' } }
.
const getDataWithAddress = async ({ ...address }) => {
// console.log(address);
const res = await transport.post(`${api}/get`, address);
console.log(res);
// return res
}
getDataWithAddress([{ address: 'abcd'}, { address: 'xyz' }])