Resource index - convert resources from struct to hash for js-obj compatibility.