# Need help sending a payload array value to my controler

**URL:** https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537
**Category:** General
**Created:** [6 June 2022 22:50 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537 "2022-06-06T22:50:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Xenos](https://avatars.discourse-cdn.com/v4/letter/x/ea5d25/32.png) [@Xenos](https://discourse.nodered.org/u/Xenos)
#### Post date: [6 June 2022 22:50 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537/1 "2022-06-06T22:50:23Z")

</div>

![Myflow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9f40ea8efe4db5df3bdfe375208ec7f2fe0c057a.jpeg)

I can get my value from the web, and I can send values to my controller. however I can fugure out how to get the web value to my controller.

What i need to do is get my msg.payload[20] or string[11] ( 5.21 / MWH)

into the value "X" of this Json code.

{  
"encode": "text",  
"propertyReferences": [  
{  
"type": "analogValue",  
"instance": 41,  
"property": "presentValue",  
"value": "X"  
}  
]  
}

Please see attached pick of my flow.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [7 June 2022 04:53 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537/2 "2022-06-07T04:53:10Z")

</div>

Are you sure you are sending it the right value ? The error in the debug appears to say it wants a float and you are sending it a string ?

Can you post up your code so we can see how you are constructing the JSON

It would also be worthwhile posting up the relevant info re the Bacnet controller confirm what values it supports

Craig

---

<div class="post-metadata">

### Author: ![Xenos](https://avatars.discourse-cdn.com/v4/letter/x/ea5d25/32.png) [@Xenos](https://discourse.nodered.org/u/Xenos)
#### Post date: [7 June 2022 19:55 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537/3 "2022-06-07T19:55:27Z")

</div>

I see it now, I have to convert the string to a number.

Thank you

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [7 June 2022 22:18 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537/4 "2022-06-07T22:18:04Z")

</div>

And more importantly a float by the error message

Craig

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [6 August 2022 22:18 UTC](https://discourse.nodered.org/t/need-help-sending-a-payload-array-value-to-my-controler/63537/5 "2022-08-06T22:18:19Z")

</div>

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