convert xml to json javascript