Hi all,
I want GET data from other application by API (see the below for the JSON structure)
I have 4 BO and every BO have an attribute that I set peer relation with other BO.
Currently, I already can get the data for item_details BO but I'm stuck when want catch the data for category_detail BO. If I check the table of category BO in my database, the count of records already same with count of records in item_details BO.
So, my question is how can I get the data for category_detail?
FYI, I have try set the peer relation that support multiple but still no luck
How I GET the data from JSON structure?
How I GET the data from JSON structure?
Regards,
Suwandy
-----------------
Kisaran - Indonesia
Suwandy
-----------------
Kisaran - Indonesia
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How I GET the data from JSON structure?
You should have:
1) CategoryDetail BO with attributes:
a) id
b) name
c) type
2) Category BO with attributes:
a) data (of type CategoryDetail single)
3) ItemDetails BO with attributes:
a) id
b) name
c) description
d) category (of type Category single)
4) Response BO with attributes:
a) data of type ItemDetails multiple
1) CategoryDetail BO with attributes:
a) id
b) name
c) type
2) Category BO with attributes:
a) data (of type CategoryDetail single)
3) ItemDetails BO with attributes:
a) id
b) name
c) description
d) category (of type Category single)
4) Response BO with attributes:
a) data of type ItemDetails multiple
Aware IM Support Team
Re: How I GET the data from JSON structure?
Interesting how Vlad's brain processes this in reverse order of how I would imagine it.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How I GET the data from JSON structure?
Thank you Support, I was already designed like your comment but no luck so that's why I open this thread with my design as attachment.aware_support wrote: ↑Fri Jul 23, 2021 12:50 am You should have:
1) CategoryDetail BO with attributes:
a) id
b) name
c) type
2) Category BO with attributes:
a) data (of type CategoryDetail single)
3) ItemDetails BO with attributes:
a) id
b) name
c) description
d) category (of type Category single)
4) Response BO with attributes:
a) data of type ItemDetails multiple
After I worst a day, I found the answer now. Maybe every API can different, so I solve it with merge all attributes from category_detail BO into category BO
Regards,
Suwandy
-----------------
Kisaran - Indonesia
Suwandy
-----------------
Kisaran - Indonesia