xx1234g
13 years agoOccasional Contributor
How can I put multiple data in a single property?
Hi all,
I am currently working on a project required a complex nested properties.
For example:
When I call the DeviceRequest API, it required 2 properties (device_name & device_info).
Apparently, device_name is just a string, I can input any characters in it.
But "device_info" actually like an object contains multiple data (device_type, model_name, & wan_ip).
The only way I can think of is to type the data myself in the data textbox, but it would be very inefficient.
Ex:

Are there any better ways to perform this kinda request?
I have tried the DataSource, but it only brings the values into the data textbox. It wouldn't include the property names that I showed above.
Please give me a suggestion.
Thank you
Andy
I am currently working on a project required a complex nested properties.
For example:
DeviceRequest
Property Name Data Type
* device_name string
* device_info DeviceInfo
DeviceInfo
Property Name Data Type
* device_type string
* model_name string
* wan_ip string
When I call the DeviceRequest API, it required 2 properties (device_name & device_info).
Apparently, device_name is just a string, I can input any characters in it.
But "device_info" actually like an object contains multiple data (device_type, model_name, & wan_ip).
The only way I can think of is to type the data myself in the data textbox, but it would be very inefficient.
Ex:
{ "device_type": "string",
"model_name": "string",
"wan_ip": "string" }

Are there any better ways to perform this kinda request?
I have tried the DataSource, but it only brings the values into the data textbox. It wouldn't include the property names that I showed above.
Please give me a suggestion.
Thank you
Andy