# Need Help - Gives me error that it's looking for an ARRAY

**URL:** <https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884>\
**Category:** General\
**Created:** [8 December 2022 16:06 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884 "2022-12-08T16:06:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![damica51](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@damica51](https://discourse.nodered.org/u/damica51)\
**Post date:** [8 December 2022 16:06 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/1 "2022-12-08T16:06:33Z")

</div>

I have a flow that I think is working the way it should but I'm getting an error when I try to Publish with MQTT Sparkplug. It tells me the "metrics" is looking for array. The problem is that I do have an array in the metrics.  
As you can see my debug show exactly what I think I should have to be able to publish.

I'm not working on this on my computer so I have to take a picture of the screen to show what I mean.

 ![NodeRedSample](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/159a170505ef9b5b1a7d9dcdd5c0e58f94a22fab.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 December 2022 16:30 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/2 "2022-12-08T16:30:45Z")

</div>

I don't know anything about sparkplug, but I see that in the config you appear have said that is a Boolean, the debug says that it is a String, and the error says it should be an array. Perhaps you are trying to say that the value associated with element TagData[2] is a boolean, but is actually a number (137.86). Did you mean [1]? But even that is not a boolean it is a string.

Which sparkplug node are you using? There are several in the node red flows pages.

---

<div class="post-metadata">

**Author:** ![damica51](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@damica51](https://discourse.nodered.org/u/damica51)\
**Post date:** [8 December 2022 16:41 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/3 "2022-12-08T16:41:12Z")

</div>

I am using "node-red-contrib-mqtt-sparkplug-plus"

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 December 2022 16:44 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/4 "2022-12-08T16:44:11Z")

</div>

A quick look at the readme for the node suggests that the array must be called metrics.

---

<div class="post-metadata">

**Author:** ![damica51](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@damica51](https://discourse.nodered.org/u/damica51)\
**Post date:** [8 December 2022 17:22 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/5 "2022-12-08T17:22:05Z")

</div>

I think you made a great point. I did try that but I was using Metrics and when I change to lower case it all came together.

Thanks for pointing that out.

---

<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:** [22 December 2022 17:22 UTC](https://discourse.nodered.org/t/need-help-gives-me-error-that-its-looking-for-an-array/71884/6 "2022-12-22T17:22:49Z")

</div>

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