xml-js icon indicating copy to clipboard operation
xml-js copied to clipboard

i need help with this example!!!!! Help me XD

Open FernandoReynosoMartinez opened this issue 4 years ago • 2 comments

Is there a way to get this to completely remove tags like <example/> where there is never anything in the object? I don't care about reproducing the XML as I'm just converting a third party XML API into JSON so it is easier to work with. The API sends empty tags when there is no information for that datapoint but that leaves my JSON full of those keys like example: {} but I'd rather have example: null or just not have it at all.

Originally posted by @JamesCoyle in https://github.com/nashwaan/xml-js/issues/53#issuecomment-489092039

FernandoReynosoMartinez avatar Jun 27 '20 06:06 FernandoReynosoMartinez

Help me

FernandoReynosoMartinez avatar Jun 29 '20 03:06 FernandoReynosoMartinez

maybe use a regular expression?

YYenZ avatar Nov 18 '21 09:11 YYenZ