# Replicate value

**URL:** <https://community.n8n.io/t/replicate-value/24975>\
**Category:** Questions\
**Tags:** expressions\
**Created:** [8 أبريل 2023، 11:55ص UTC](https://community.n8n.io/t/replicate-value/24975 "2023-04-08T11:55:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruan17](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ruan17/32/80411_2.png) [@Ruan17](https://community.n8n.io/u/Ruan17)\
**Post date:** [8 أبريل 2023، 11:55ص UTC](https://community.n8n.io/t/replicate-value/24975/1 "2023-04-08T11:55:19Z")

</div>

How can I recycle the values of urlBaseNova and apiKeyNova for the other items in the array?

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/8/a/8a24d57ec9c38ef61ccf665a4760b203b4f0a428.png)

---

<div class="post-metadata">

**Author:** ![htnrodrigues](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/htnrodrigues/32/17683_2.png) [@htnrodrigues](https://community.n8n.io/u/htnrodrigues)\
**Post date:** [8 أبريل 2023، 4:03م UTC](https://community.n8n.io/t/replicate-value/24975/2 "2023-04-08T16:03:26Z")

</div>

Hey @Ruan17,

I don’t know why, but for me when I run it with the expression like this, it runs perfectly {{ $node[“DADOS KUTT”].json[“urlBaseNova”] }}

Then test and see if it works.

---

<div class="post-metadata">

**Author:** ![Ruan17](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ruan17/32/80411_2.png) [@Ruan17](https://community.n8n.io/u/Ruan17)\
**Post date:** [9 أبريل 2023، 1:26ص UTC](https://community.n8n.io/t/replicate-value/24975/3 "2023-04-09T01:26:40Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/4/74af927ecfac556f4fd2fe2210df7cae25caff22.png)  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/2/8/28e89892bf8ad2a7a1b5ae16c4e5753b170f6141.png)

the same bug, it only stays in the first item, for the next ones they still don’t go

---

<div class="post-metadata">

**Author:** ![pemontto](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pemontto/32/2684_2.png) [@pemontto](https://community.n8n.io/u/pemontto)\
**Post date:** [9 أبريل 2023، 7:01ص UTC](https://community.n8n.io/t/replicate-value/24975/4 "2023-04-09T07:01:07Z")

</div>

Seeing as your DADOS node has only one item output, and the node your referencing has multiple, the first item works, but the subsequent items 2-11 are looking for items 2-11 on the DADOS node which don’t exist (undefined).

If your n8n version is new enough you can use the new magical item linking  
`$('DADOS KUTT').item.json.urlBaseNova` which should know that each of those 11 items in Set1 relate to item 1 in the DADOS node.

The alternative, if the DADOS node will only ever output a single item is to use `$('DADOS KUTT').first().json.urlBaseNova`, or `$('DADOS KUTT').itemMatching(0).json.urlBaseNova`. The old version of this was `$item(0).$node['DADOS KUTT'].data.urlBaseNova`

Check these specific docs - [Built in methods and variables reference - n8n Documentation](https://docs.n8n.io/code-examples/methods-variables-reference/#output-of-other-nodes)

Here’s a sample workflow with each type of expression and the result

---

<div class="post-metadata">

**Author:** ![Ruan17](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ruan17/32/80411_2.png) [@Ruan17](https://community.n8n.io/u/Ruan17)\
**Post date:** [9 أبريل 2023، 12:29م UTC](https://community.n8n.io/t/replicate-value/24975/5 "2023-04-09T12:29:22Z")

</div>

> [@pemontto](#):
>
> Here’s a sample workflow with each type of expression and the result

It worked perfectly, thanks a lot for the help! Now how did you know how to use `{{ $('KUTT DATA').item.json.urlBaseNova }}` because I only knew how to use these two `{{ $node["DADOS KUTT"].json["urlBaseNova"] }}` and `{{ $node["KUTT DATA"].json.urlBaseNew }}`

I want to know so I can study more

---

<div class="post-metadata">

**Author:** ![pemontto](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pemontto/32/2684_2.png) [@pemontto](https://community.n8n.io/u/pemontto)\
**Post date:** [9 أبريل 2023، 1:47م UTC](https://community.n8n.io/t/replicate-value/24975/6 "2023-04-09T13:47:46Z")

</div>

The docs mate 😂

> **[Built in methods and variables reference - n8n Documentation](https://docs.n8n.io/code-examples/methods-variables-reference/#output-of-other-nodes)**
>
> Built-in methods and variables you can use in expressions and code in n8n.

---

<div class="post-metadata">

**Author:** ![Ruan17](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ruan17/32/80411_2.png) [@Ruan17](https://community.n8n.io/u/Ruan17)\
**Post date:** [9 أبريل 2023، 4:27م UTC](https://community.n8n.io/t/replicate-value/24975/7 "2023-04-09T16:27:54Z")

</div>

true🤣 I thought it was only for use in the `node code` hahaha and do you have any link to use the `node code`?

---

<div class="post-metadata">

**Author:** ![pemontto](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pemontto/32/2684_2.png) [@pemontto](https://community.n8n.io/u/pemontto)\
**Post date:** [9 أبريل 2023، 5:37م UTC](https://community.n8n.io/t/replicate-value/24975/8 "2023-04-09T17:37:48Z")

</div>

The documentation there applies to both the code node, and anywhere you can write an expression. One exception… the column that says `Available in Code node?` 😉

What I would recommend is doing the n8n courses, however I’m not sure they’ve been updated with the code node, and updated method/referencing…

---

<div class="post-metadata">

**Author:** ![Ruan17](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ruan17/32/80411_2.png) [@Ruan17](https://community.n8n.io/u/Ruan17)\
**Post date:** [9 أبريل 2023، 7:07م UTC](https://community.n8n.io/t/replicate-value/24975/9 "2023-04-09T19:07:31Z")

</div>

thanks. I will study about

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [16 أبريل 2023، 7:08م UTC](https://community.n8n.io/t/replicate-value/24975/10 "2023-04-16T19:08:24Z")

</div>

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