Hi I need one help When I am using xml2js node js lib. I am able to convert the XML to JSON object however when I am iterating JSON element I can see the '$': as few of the key elements. Is there a way I can eliminate the $ key?
try regex to replace the $ key
or
use JSON.parse() to replace the $.
You can use attrkey
to change the $
key to sth else.
Or you can ignore it (do not create attribute node) with ignoreAttrs
set to true
as per the readme of xml2js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.