rbren / rss-parser

A lightweight RSS parser, for Node and the browser
MIT License
1.38k stars 209 forks source link

Renaming nested fields #213

Open madsfjeder opened 3 years ago

madsfjeder commented 3 years ago

Hi! Great library, thanks for the hard work.

I've encountered an issue (or I just don't know how to do it), where I'm trying to rename a nested field. The parsed object looks like this:

title: "Good Title", content: "Yadada", DR:XmlImageArticle: { DR:ImageUri620x349: ["URLImInterestedIn"] }

Now, I'm interested in the last item in the object above, and I can successfully rename DR:XmlImageArticle but not the nested key DR:ImageUri620x349. I can access it manually, but as I'm iterating over multiple feeds I'd really like to rename it to something more sensible. Parser options look like described in the ReadMe - including the nested value and renaming that does nothing.

parserOptions: [['DR:XmlImageArticle', "img"]]

Any help appreciated!

JacobWennebro commented 2 months ago

Having the same issue in 2024, did you figure anything out? 😄