- Swiggy api responds with an array of cards, the card containing list of restaurants has an `id: restaurant_grid_listing`. - So instead of hard coding the card number like `cards[2]` or `cards[5]`, using `for of` to find the same is better approach.
Swiggy api responds with an array of cards, the card containing list of restaurants has an
id: restaurant_grid_listing.So instead of hard coding the card number like
cards[2]orcards[5], usingfor ofto find the same is better approach.