Transforms a JSON structure into name/value pairs so objects are able to be iterated over if required.
Version 1
HTTP RequestPOST
/ado/v1/JsonPropertiesToNameValuePairArray
Header
Parameter | Description |
---|---|
Ocp-Apim-Subscription-Key | The subscription key you received when you purchased a plan. |
Request Body
Mandatory
Parameter | Type | Description |
---|---|---|
data | object/array | JSON structure. |
Examples
Simple
Request
{
"data": {
"Connection": null,
"Accept": "*/*",
"ArrayValues": [
{
"ArrayProperty1": 1,
"ArrayProperty2": 2
},
{
"ArrayProperty1": 3,
"ArrayProperty2": 4
},
{
"ArrayProperty1": 5,
"ArrayProperty2": 6
}
],
"Object": {
"Property1": "Value1",
"Property2": {
"SubProperty1": "SubValue1",
"SubProperty2": 123
},
"Property3": "Value3"
},
"Content-Type": "application/json"
}
}
Code language: JSON / JSON with Comments (json)
Response
[
{
"propertyName": "Connection",
"propertyType": "Null",
"propertyValue": null
},
{
"propertyName": "Accept",
"propertyType": "String",
"propertyValue": "*/*"
},
{
"propertyName": "ArrayValues",
"propertyType": "Array",
"propertyValue": [
[
{
"propertyName": "ArrayProperty1",
"propertyType": "Integer",
"propertyValue": 1
},
{
"propertyName": "ArrayProperty2",
"propertyType": "Integer",
"propertyValue": 2
}
],
[
{
"propertyName": "ArrayProperty1",
"propertyType": "Integer",
"propertyValue": 3
},
{
"propertyName": "ArrayProperty2",
"propertyType": "Integer",
"propertyValue": 4
}
],
[
{
"propertyName": "ArrayProperty1",
"propertyType": "Integer",
"propertyValue": 5
},
{
"propertyName": "ArrayProperty2",
"propertyType": "Integer",
"propertyValue": 6
}
]
]
},
{
"propertyName": "Object",
"propertyType": "Object",
"propertyValue": [
{
"propertyName": "Property1",
"propertyType": "String",
"propertyValue": "Value1"
},
{
"propertyName": "Property2",
"propertyType": "Object",
"propertyValue": [
{
"propertyName": "SubProperty1",
"propertyType": "String",
"propertyValue": "SubValue1"
},
{
"propertyName": "SubProperty2",
"propertyType": "Integer",
"propertyValue": 123
}
]
},
{
"propertyName": "Property3",
"propertyType": "String",
"propertyValue": "Value3"
}
]
},
{
"propertyName": "Content-Type",
"propertyType": "String",
"propertyValue": "application/json"
}
]
Code language: JSON / JSON with Comments (json)