I am using react native to build an app and NodeJS as backend, in the backend I am using MySQL to fetch data from database and send it to frontend. the data in frontend looks like this:
[{"code": "21500", "dayTime": "On MON 11AM - 13PM", "group_id": "012021106667", "location": "A07"}, {"code": "21503", "dayTime": "On WED 11AM - 15PM", "group_id": "012021106667", "location": "A07"}]
As shown in the data above I have two different values of code attribute, so I want to store the data related to each code in separate objects then each object data I want to display it in the app view to be shown when button clicked.
For example from the data above I have two different codes so, I will have two objects, therefore in the <View> </View>
automatically two buttons will show and each button have one of the object data.
it may this question sound an easy question but I am really stuck in how to do that.
thanks in advance.