cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Finding data in json from an infotable.

MR_10404102
6-Contributor

Finding data in json from an infotable.

Hello,

 

Can somebody help me to write a service in thingworx where infotable data value is checked if it is found in a json data.

 

Thanks.

 

ACCEPTED SOLUTION

Accepted Solutions

  • Iterate the infotable
  • Compare values with JSON from infotable
  • if found, get the required values
var info = [INFOTABLE];
for( var  i = 0; i < info.length; i++){
   //Get the infotable row values
   //Search in JSON
   if(isFound == true){
      //Get the required value
   }
}

If possible share the sample dataset.

View solution in original post

3 REPLIES 3

Can you please explain bit more about your use case?

I have a json data which has multiple json arrays. I have an infotable which has data which can be compared to the json data. If at all i find the value in the json then i have to get certain key value pairs of that object. 

  • Iterate the infotable
  • Compare values with JSON from infotable
  • if found, get the required values
var info = [INFOTABLE];
for( var  i = 0; i < info.length; i++){
   //Get the infotable row values
   //Search in JSON
   if(isFound == true){
      //Get the required value
   }
}

If possible share the sample dataset.

Announcements


Top Tags