0

I want to put the JSON data into an array and fetch the data

{  

"data":{
"platform":{
"id":"d0feb170-76ed-77e9-a24f-44c49397cb8f",
"version":0, "updatedTime":1557910234867, "dataVersion":{
"version":0, "updatedTime":1557910234867 } }, "machine":{
"version":44, "updatedTime":1557910026619, "version":{
"version":19, "updatedTime":1557910026619 }, "systemId":"Machine1",
"activeStatus":"true",
"settings":[
{
"protNumber":"1.2", "proto":"TestHead2^^Adult^^Head", "id":"21a8fbb8-40ea-4868-ae3a-ee1d130eb01b", "name":"TestHead2", "humanoid":"Adult", "anatomy":"Head",
"lastUpdated":"Wed, 15 May 2019 08:47:06 GMT",
"version":0 }, {
"protNumber":"1.8", "proto":"TestHead8^^Adult^^Head", "id":"2a25874e-cb9f-40c1-93db-a0859b209491", "name":"TestHead8", "humanoid":"Adult", "anatomy":"Head",
"lastUpdated":"Wed, 15 May 2019 08:47:06 GMT",
"version":0 }, {
"protNumber":"1.88", "proto":"TestHead88^^Adult^^Head", "id":"50cc13d8-6d43-4fcd-9d60-08ce4f97632d", "name":"TestHead88", "humanoid":"Adult", "anatomy":"Head",
"lastUpdated":"Wed, 15 May 2019 08:47:06 GMT",
"version":0 } ], "deviceDeviation":{
"new":9, "deviated":0, "newMatched":0,
"totalProtocols":3 } } }, "success":true, "statusCode":200, "errorMessage":"" }

How can I put the data in the settings into an Array and fetch them one by one?

1 Answer 1

0

Use JSON Extractor to fetch data:-

Below, I have created one JSON extractor config for protNumber. enter image description here

Please check the variable in the results. You can use the first three variables or if you need all then use the 4th...depend on your requirement. Fetch using ${prNumVar_1},${prNumVar_2} etc enter image description here Create multiple extractor for different variables..like prot, id, name as per your requirement.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.