I ususllay json_decode with true. Make looping easier. This might give you an idea: https://gist.github.com/jimgwhit/cbbe5bb0d2556fdc7e37a86d3630239c
Apr 7, 2022
4
Level 2
API Response
Hi,
I have made a take order API and that is a POST API now android developer add data into the API form, and that data is coming into my controller when I return the whole $request the response is below. Please guide me on how can I add Loop and other operations on that particular order detail to store my order in my DB
The response is
{"data":"{franchise_id: 1, products: [{id: 1, quantity: 4, extras: [2], modifier: [{id: 2, items: [4]}, {id: 1, items: [4, 5]}]}, {id: 2, quantity: 6, extras: [1, 2], modifier: [{id: 2, items: [5]}]}, {id: 3, quantity: 2, extras: [3], modifier: []}], is_pickup: true, user_id: 1, sub_total: 30000.0, total: 30000.0}"}
Level 2
I get the solution actually the data is not JSON this is string data.
Please or to participate in this conversation.