EDIT I am able to work around the issue by doing JSON.stringify(jsonObj).match(/\\r\\n/)
Hi, when I parse this xml:
<tag1></tag1>
the jsonObj i get is:
{ tag1: [ '\015\n ' ] }
when it should be:
{ tag1: [{}] }
or:
{ tag1: "" }
i'm trying to use lodash's _.forEach() to aggregate Object.keys(jsonObj).length for a few tag occurrences,
but the resulting { tag1: [ '\015\n ' ] } JSON throws me an error when i do Object.keys(jsonObj).length
EDIT I am able to work around the issue by doing
JSON.stringify(jsonObj).match(/\\r\\n/)
Hi, when I parse this xml:
<tag1>
</tag1>
the jsonObj i get is:
{ tag1: [ '\015\n ' ] }
when it should be:{ tag1: [{}] }
or:{ tag1: "" }
i'm trying to use lodash's
_.forEach()
to aggregateObject.keys(jsonObj).length
for a few tag occurrences, but the resulting{ tag1: [ '\015\n ' ] }
JSON throws me an error when i doObject.keys(jsonObj).length