I'm trying to Create a specific Syntax for POST Request.
That is, using Javascript to Create the specified Array Structure based on certain data.
Data : Array of Objects. Each Object represents a row in a Table. Those rows, have an ID Key, that can be found on More that one Row.
POST Request : Create the Below POST Request Syntax:
For Each Unique Row ID, create the P1 Section. (This Object Represents each Unique ID )
- If ID is entered more that once, do not create more P1 Sections with same ID. P1 is already created for this ID.
For each of these unique IDs, get its Row Details and place them in Section P2.
- If Unique IDs rows are more that one, create multiple P2 Sections for the Specific ID.
[ [
P1 - {
"Swee": "Cont",
"Time": 33,
"ID": 10,
"Configs": [
P2 - {
"VAL": "VALUE"
P2 - }
]
P1 - }
] ] Please, anyone can help please do.