Setting Images with information from userdata

quite new to dhtmlxtree i try to set several images for tree entries with relating to information in userdata. I could parse the whole JSON struct for ids of tree entries with special userdata entry. but this is a slow and lengthy procedure. is there an easier way to get this information or to set images for all entries with special userdata?

a) instead of userdata you can define images directly through item attributes (im0, im1, im2 - defines images for leaf, open branch, closed branch )

b) You can define default images for all items in the tree.
tree.setStdImages(im0, im1, im2);
but it need to be called before adding items to the tree.

Thx. did not find it in docu. works fine