Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Associate metadata with json

Ankush asked on February 18, 2019

Is it possible to associate some id/metadata with each object in report JSON. And receive them as well, when a cell is clicked.
e.g. In this fiddle lets say I want to add id’s to jsonData object as shown below and if user clicks on a cell(having value 174 with “green” as row and  “Canada” as country), currently rows[0].caption object on “cellClick” event contains “green” as value, instead I want to get “id”=1 as well. Is there a way ? please sugest :-
var jsonData = [{“Color”:{“id”:1,”value”:”green”},”Country”:{“id”:34,”value”:”Canada”},”State”:{“id”:56,”value”:”Ontario”},”City”:{“id”:17,”value”:”Toronto”},”Price”:174,”Quantity”:22},{“Color”:{“id”:2,”value”:”red”},”Country”:{“id”:32,”value”:”USA”},”State”:{“id”:57,”value”:”California”},”City”:{“id”:18,”value”:”Los Angeles”},”Price”:166,”Quantity”:19}]

1 answer

Dmytro Zvazhii Dmytro Zvazhii Flexmonster February 19, 2019

Hello Ankush,
Thank you for your question. 
It seems that you are looking for the property data type. You can refer to the following article for more information:
Also here is a small example which describes the idea:
Please let us know if everything works fine for you.

Please login or Register to Submit Answer