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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

JSON InfoTable Property Error

morganweiss33
10-Marble

JSON InfoTable Property Error

I am trying to store data being pulled in from a JSON file into an InfoTable and I keep getting this error with one of my values from the JSON file: 

 

 Error executing service create-my-infotable. Message :: TypeError: Cannot read property "isbn" from undefined - See Script Error Log for more details.
 
I attached my code that was created with the help of the article: https://www.ptc.com/en/support/article/CS179012 and the JSON file.
 
Thank you!
 
 
 
 
 
 
ACCEPTED SOLUTION

Accepted Solutions

Had you tried data.array[i].isbn?

Maybe better you print the JSON content to the log console:

 

logger.info(" JSON content "+JSON.stringify(data));

 

View solution in original post

3 REPLIES 3

Hi! How/where is your "data" variable set? As an input to the service or as code above the screenshot?

Had you tried data.array[i].isbn?

Maybe better you print the JSON content to the log console:

 

logger.info(" JSON content "+JSON.stringify(data));

 

This worked for me! Thank you so much.

Announcements


Top Tags