Extracting values from a JSON object (RSS Feed)

Issue/Objective

Hello! I’m trying to extract a certain JSON object (link) that the RSS Feed returns to my Split In Batches node, after extracting the content of the “link” object I would like to perform a manipulation to extract only the URL path.

I tried to do this with the Code node, getting the entire JSON through $input.all(), but without success. I don’t know if I’m trying the right way, or if there’s some other way to do this, but initially, I’d just like to store the content of the “link” object returned by my RSS Feed in a variable inside a “Set” node, to manipulate the string later

A take of my current workflow

Output returned by the last node (Split in Batches)

[
{
"creator":"Phoenix",
"title":"Funny title",
"link":"https://domain.com/path-i-want-scrap",
"pubDate":"Fri, 10 Mar 2023 21:30:00 +0000",
"content:encoded":"Some content",
"content:encodedSnippet":"Some content",
"dc:creator":"Coordenação",
"comments":"Some link",
"content":"Some content",
"contentSnippet":"Some text",
"guid":"https://domain.com/blog/?p=426341",
"categories": [
"Some category"
],
"isoDate":2023-03-10T16:30:00.000-05:00
}
]

This is the output returned by SplitInBatches Node, and i want to extract the value of “link” object.

~ I apologize if I formulated the topic in the wrong way, it’s my first one here on the forum xd

  • n8n version: 0.216.0

Hey @devilgothies,

Welcome to the community :tada:

What about using a Set node to get the Link and replace the domain at the start with nothing? The workflow at the bottom will give you an output like this…

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