In order to store arbitrary data in jsTree nodes, I'm passing a custom attribute (say node-data) to the create_node method. But I need to store more than one piece of data in the single attribute. (For example name,age etc.) What format would be best suited for the value of the node-data attribute? What I'm looking for is a format that will allow easy retrieval of data.
For example we can have a format like "name:John,age:26". But I will have to split the string by using the comma as the delimiter and split at the colon to separate the name and value. Is there a better way to do this?