Remove JSON field "text" using Javascript

Hi there - I am using a tool that builds a JSON file using JS commands. Here’s an example output that removes the fields favicon, copyright, etc

($) => {
    const result = {};
    // Uncomment to add a title to the output
    // result.pageTitle = $('title').text().trim();

    return result;
}


($, currentItem) => {
    return {
        guid: currentItem.date.replace(/\D/g, ""),
        favicon: undefined,
        pubDate:  $('.news__date').text().trim(),
        copyright: undefined,
        image: undefined
        }
    
}

By default it outputs fields including one called text but if I add text: undefined it doesn’t work. Any idea why it would remove all other fields but not this one?

you should provide the tool name, or people cant tell how its meant to work

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.