Skip to content

Multiple enclosure tags get overwrittenΒ #254

@black-hawk85

Description

@black-hawk85

I need to parse an RSS to JSON which has multiple enclosure tags within an item

<item>
<title>...</title>
<enclosure url="..." type="..." />
<enclosure url="..." type="..." />
<enclosure url="..." type="..." />
</item>

My resulted JSON Object only has a single enclosure object instead of an array.
I tried using keepArray option already but it still happens.

It seems it gets overwritten in parser.js

item.enclosure = xmlItem.enclosure[0].$;

It's hard coded taking only the first enclosure item

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions