How to access different values from the Aggregator Output

There are 10 elements in the output array. Say I want to access and add the marked fields in below image to content field in WordPress module what should I do.

Hey There @nish3real ,
can you share the output bundles , so that i can assist you further.
Screenshot_2023-10-06_141025

2 Likes

here’s the output bundle

[
{
“array”: [
{
“text”: “RT @desjjbb: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenville,…”,
“entities”: {
“annotations”: [
{
“start”: 43,
“end”: 52,
“probability”: 0.8356,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 58,
“end”: 68,
“probability”: 0.5156,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 71,
“end”: 72,
“probability”: 0.5459,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 74,
“end”: 83,
“probability”: 0.5062,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 86,
“end”: 93,
“probability”: 0.4525,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 96,
“end”: 97,
“probability”: 0.5332,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 99,
“end”: 107,
“probability”: 0.5839,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 110,
“end”: 111,
“probability”: 0.5422,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 124,
“end”: 125,
“probability”: 0.5571,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 127,
“end”: 136,
“probability”: 0.6489,
“type”: “Place”,
“normalized_text”: “Greenville”
}
],
“mentions”: [
{
“start”: 3,
“end”: 11,
“username”: “desjjbb”,
“id”: “1638096698055487488”
}
]
}
},
{
“text”: “RT @trillestnycc: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenvi…”,
“entities”: {
“annotations”: [
{
“start”: 48,
“end”: 57,
“probability”: 0.8484,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 60,
“end”: 61,
“probability”: 0.3386,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 63,
“end”: 73,
“probability”: 0.5069,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 76,
“end”: 77,
“probability”: 0.55,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 79,
“end”: 88,
“probability”: 0.5004,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 91,
“end”: 98,
“probability”: 0.448,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 101,
“end”: 102,
“probability”: 0.5201,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 104,
“end”: 112,
“probability”: 0.5776,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 115,
“end”: 116,
“probability”: 0.4875,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 129,
“end”: 130,
“probability”: 0.4733,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 132,
“end”: 138,
“probability”: 0.5514,
“type”: “Place”,
“normalized_text”: “Greenvi”
}
],
“mentions”: [
{
“start”: 3,
“end”: 16,
“username”: “trillestnycc”,
“id”: “2216882743”
}
]
}
},
{
“text”: “RT @Slutt4Pablo: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenvil…”,
“entities”: {
“annotations”: [
{
“start”: 47,
“end”: 56,
“probability”: 0.8538,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 59,
“end”: 60,
“probability”: 0.3426,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 62,
“end”: 72,
“probability”: 0.5111,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 75,
“end”: 76,
“probability”: 0.5523,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 78,
“end”: 87,
“probability”: 0.4978,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 90,
“end”: 97,
“probability”: 0.455,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 100,
“end”: 101,
“probability”: 0.5282,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 103,
“end”: 111,
“probability”: 0.5755,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 114,
“end”: 115,
“probability”: 0.5087,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 128,
“end”: 129,
“probability”: 0.4958,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 131,
“end”: 138,
“probability”: 0.4418,
“type”: “Place”,
“normalized_text”: “Greenvil”
}
],
“mentions”: [
{
“start”: 3,
“end”: 15,
“username”: “Slutt4Pablo”,
“id”: “1579631937332862976”
}
]
}
},
{
“text”: “@JoshGriffithWX Here in Rock Hill, SC we were originally forecasted to get 3-5 but the change over to snow was delayed from 3 am until finally going from heavy rain to snow at 8:30 am. I recorded 2 inches. https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“entities”: {
“urls”: [
{
“start”: 206,
“end”: 229,
“url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“expanded_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“display_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“media_key”: “3_1742042674922651648”
},
{
“start”: 206,
“end”: 229,
“url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“expanded_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“display_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“media_key”: “3_1742042674926960640”
},
{
“start”: 206,
“end”: 229,
“url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“expanded_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“display_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“media_key”: “3_1742042674935279617”
},
{
“start”: 206,
“end”: 229,
“url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“expanded_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“display_url”: “https://twitter.com/jamesathomas15/status/1742042678018146614/photo/1”,
“media_key”: “3_1742042674931081216”
}
],
“annotations”: [
{
“start”: 24,
“end”: 32,
“probability”: 0.9205,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 35,
“end”: 36,
“probability”: 0.923,
“type”: “Place”,
“normalized_text”: “SC”
}
],
“mentions”: [
{
“start”: 0,
“end”: 15,
“username”: “JoshGriffithWX”,
“id”: “1506643664231186434”
}
]
}
},
{
“text”: “RT @desjjbb: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenville,…”,
“entities”: {
“annotations”: [
{
“start”: 43,
“end”: 52,
“probability”: 0.8356,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 58,
“end”: 68,
“probability”: 0.5156,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 71,
“end”: 72,
“probability”: 0.5459,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 74,
“end”: 83,
“probability”: 0.5062,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 86,
“end”: 93,
“probability”: 0.4525,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 96,
“end”: 97,
“probability”: 0.5332,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 99,
“end”: 107,
“probability”: 0.5839,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 110,
“end”: 111,
“probability”: 0.5422,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 124,
“end”: 125,
“probability”: 0.5571,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 127,
“end”: 136,
“probability”: 0.6489,
“type”: “Place”,
“normalized_text”: “Greenville”
}
],
“mentions”: [
{
“start”: 3,
“end”: 11,
“username”: “desjjbb”,
“id”: “1638096698055487488”
}
]
}
},
{
“text”: “RT @trillestnycc: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenvi…”,
“entities”: {
“annotations”: [
{
“start”: 48,
“end”: 57,
“probability”: 0.8484,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 60,
“end”: 61,
“probability”: 0.3386,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 63,
“end”: 73,
“probability”: 0.5069,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 76,
“end”: 77,
“probability”: 0.55,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 79,
“end”: 88,
“probability”: 0.5004,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 91,
“end”: 98,
“probability”: 0.448,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 101,
“end”: 102,
“probability”: 0.5201,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 104,
“end”: 112,
“probability”: 0.5776,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 115,
“end”: 116,
“probability”: 0.4875,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 129,
“end”: 130,
“probability”: 0.4733,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 132,
“end”: 138,
“probability”: 0.5514,
“type”: “Place”,
“normalized_text”: “Greenvi”
}
],
“mentions”: [
{
“start”: 3,
“end”: 16,
“username”: “trillestnycc”,
“id”: “2216882743”
}
]
}
},
{
“text”: “Take a look at this Certified Pre Owned 2023 CR-V Hybrid Sport SUV at Honda Cars of Rock Hill. PRICED TO MOVE $1,400 below J.D. Power Retail!\n\nhttps://www.hondacarsrockhill.com/certified/Honda/2023-Honda-CR-V+Hybrid-rock-hill-sc-834813810a0e083a0dbfec3fbe61e38b.htm”,
“entities”: {
“urls”: [
{
“start”: 143,
“end”: 166,
“url”: “https://www.hondacarsrockhill.com/certified/Honda/2023-Honda-CR-V+Hybrid-rock-hill-sc-834813810a0e083a0dbfec3fbe61e38b.htm”,
“expanded_url”: “https://www.hondacarsrockhill.com/certified/Honda/2023-Honda-CR-V+Hybrid-rock-hill-sc-834813810a0e083a0dbfec3fbe61e38b.htm”,
“display_url”: “hondacarsrockhill.com/certified/Hond…”,
“images”: [
{
“url”: “https://pbs.twimg.com/news_img/1742017587486347264/Fnt_2rTw?format=jpg&name=orig”,
“width”: 1600,
“height”: 1200
},
{
“url”: “https://pbs.twimg.com/news_img/1742017587486347264/Fnt_2rTw?format=jpg&name=150x150”,
“width”: 150,
“height”: 150
}
],
“status”: 200,
“title”: “Used 2023 Honda CR-V Hybrid Sport for sale in Rock Hill, SC | Near Fort Mill, Charlotte, NC, Gastonia, NC & Indian Trail, NC | VIN:7FARS6H51PE003803”,
“description”: “View this Used 2023 Honda CR-V Hybrid Sport for sale in Rock Hill, SC. Call 888-919-0422 for more information about this Stock#R40209A.”,
“unwound_url”: “https://www.hondacarsrockhill.com/certified/Honda/2023-Honda-CR-V+Hybrid-rock-hill-sc-834813810a0e083a0dbfec3fbe61e38b.htm”
}
],
“annotations”: [
{
“start”: 45,
“end”: 65,
“probability”: 0.6426,
“type”: “Other”,
“normalized_text”: “CR-V Hybrid Sport SUV”
},
{
“start”: 70,
“end”: 79,
“probability”: 0.6492,
“type”: “Other”,
“normalized_text”: “Honda Cars”
},
{
“start”: 84,
“end”: 92,
“probability”: 0.6172,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 123,
“end”: 123,
“probability”: 0.4874,
“type”: “Other”,
“normalized_text”: “J”
},
{
“start”: 125,
“end”: 126,
“probability”: 0.5723,
“type”: “Other”,
“normalized_text”: “D.”
}
]
}
},
{
“text”: “Check out this Pre-Owned 2022 Ridgeline RTL Pickup at Honda Cars of Rock Hill. $5,200 below J.D. Power Retail!\n\nhttps://www.hondacarsrockhill.com/used/Honda/2022-Honda-Ridgeline-rock-hill-sc-a10cd9990a0e0a930dcdd271c3c0f383.htm”,
“entities”: {
“urls”: [
{
“start”: 112,
“end”: 135,
“url”: “https://www.hondacarsrockhill.com/used/Honda/2022-Honda-Ridgeline-rock-hill-sc-a10cd9990a0e0a930dcdd271c3c0f383.htm”,
“expanded_url”: “https://www.hondacarsrockhill.com/used/Honda/2022-Honda-Ridgeline-rock-hill-sc-a10cd9990a0e0a930dcdd271c3c0f383.htm”,
“display_url”: “hondacarsrockhill.com/used/Honda/202…”,
“images”: [
{
“url”: “https://pbs.twimg.com/news_img/1742017104436723712/_ZEFivyy?format=jpg&name=orig”,
“width”: 1600,
“height”: 1200
},
{
“url”: “https://pbs.twimg.com/news_img/1742017104436723712/_ZEFivyy?format=jpg&name=150x150”,
“width”: 150,
“height”: 150
}
],
“status”: 200,
“title”: “Used 2022 Honda Ridgeline RTL Pickup | Rock Hill, SC | 5FPYK3F57NB008078”,
“description”: “Used 2022 Honda Ridgeline for sale in Rock Hill. SC. Give Honda Cars of Rock Hill a call at 888-919-0422 for more information about this Ridgeline or other Honda models we have in stock. VIN 5FPYK3F57NB008078”,
“unwound_url”: “https://www.hondacarsrockhill.com/used/Honda/2022-Honda-Ridgeline-rock-hill-sc-a10cd9990a0e0a930dcdd271c3c0f383.htm”
}
]
}
},
{
“text”: “RT @desjjbb: Rt if you’re in these cities\n\nCharleston, SC\nHilton Head, SC\nOrangeburg, SC\nAiken, SC\nRock Hill, SC \nColumbia, SC\nGreenville,…”,
“entities”: {
“annotations”: [
{
“start”: 43,
“end”: 52,
“probability”: 0.8356,
“type”: “Place”,
“normalized_text”: “Charleston”
},
{
“start”: 58,
“end”: 68,
“probability”: 0.5156,
“type”: “Place”,
“normalized_text”: “Hilton Head”
},
{
“start”: 71,
“end”: 72,
“probability”: 0.5459,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 74,
“end”: 83,
“probability”: 0.5062,
“type”: “Place”,
“normalized_text”: “Orangeburg”
},
{
“start”: 86,
“end”: 93,
“probability”: 0.4525,
“type”: “Place”,
“normalized_text”: “SC\nAiken”
},
{
“start”: 96,
“end”: 97,
“probability”: 0.5332,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 99,
“end”: 107,
“probability”: 0.5839,
“type”: “Place”,
“normalized_text”: “Rock Hill”
},
{
“start”: 110,
“end”: 111,
“probability”: 0.5422,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 124,
“end”: 125,
“probability”: 0.5571,
“type”: “Place”,
“normalized_text”: “SC”
},
{
“start”: 127,
“end”: 136,
“probability”: 0.6489,
“type”: “Place”,
“normalized_text”: “Greenville”
}
],
“mentions”: [
{
“start”: 3,
“end”: 11,
“username”: “desjjbb”,
“id”: “1638096698055487488”
}
]

I have omitted a few characters from output bundles because of character limit allowed here.

Hey @nish3real ,
can you provide the full output bundle in a file format ?

2 Likes

Sorry, we can’t use that as it isn’t valid JSON. In future, could you format JSON code before submitting the reply, otherwise the forum software will convert some characters to make them invalid (checked when pasted into https://jsonformatter.org)

1.

Could you format your JSON by editing three backticks ``` before and after the code, like this:

```
input/output bundle goes here
```

2.

or use the format code button in the editor:
Screenshot_2023-10-02_191027

3.

Alternatively, you can paste and save the contents of the bundles in your text editor as a bundle.txt file, and upload it here into this discussion thread (or upload to Google Drive and provide the sharing link).

Once the post has been submitted, it’s too late to format it since it’s already butchered, and you need to make a fresh copy of output bundle, and format it before submitting the forum post.

@Ishan I would appreciate it if you do not steal my screenshots, you can make your own.

2 Likes

Hey @samliew , sorry if you felt disrespected about me using the screenshot to help @nish3real , We all are here to help the make community so you should take things more positively.
Regards

1 Like

No worries, the least you could have done is to ask for permission to reuse other people’s content first. Even if the intention was right, using other content without permission is stealing.

E.g.: we cannot steal from the bank to give to the poor people, you are still doing something illegal and disrespectful

I hope you will learn from this and not do it without permission next time.

1 Like

Here is output bundle with backstrokes added

Hi @nish3real

As I see your input, there is no need to aggregate the output from Twitter module. You can directly map the text and url from twitter module in your next module.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

There are 10 bundles that Twitter gives out. but in the next module I can’t all of them. Only First bundle I can directly access.

@nish3real
you will see only one bundle but once you will run the scenario, it will process each bundle one by one.
While using array aggregator, you will see only one bundle again but also process only one bundle.
Hence, if you want to access each collection from data, it should not be an array.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

2 Likes

I noticed some of your bundles doesn’t contain images,

So what you can do is before your aggregator, you set a variable for easy access afterwards

Screenshot_2024-01-02_200156

Replace (91) with your Twitter module’s number (7)

{{ ifempty(91.entities.urls.1.images.1.url; emptystring) }}

Output:

2 Likes

Thanks I’ll try it out.

Yes you were right. It processes one by one. And Ran perfectly. Then I went a little advanced to make the tweets appear as cards and added some div tags I got from ChatGPT and Custom CSS in the theme.

Now what happens is same card in the wordpress post is overwritten when it exceutes multiple times.

Here is my JSON file please help.
blueprint.json (60.2 KB)