# Search for in change node

**URL:** https://discourse.nodered.org/t/search-for-in-change-node/92171
**Category:** General
**Created:** [4 October 2024 20:31 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171 "2024-10-04T20:31:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![goosst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/goosst/32/95112_2.png) [@goosst](https://discourse.nodered.org/u/goosst)
#### Post date: [4 October 2024 20:31 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171/1 "2024-10-04T20:31:52Z")

</div>

Hi

I'm new to node-red and seem to run against something not very logical?

I try to replace the word "NA" with a value, so I can send it in a http request.  
For some reason the string is not recognized in the change node when using the "search for" option, despite being part of the payload.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/1456b7a9558bc97df81ca8a59e754bc223b62994.png)

I've tried to make several variants (with/without quotes to search, pointing to the exact part of the payload, ...) but the word NA is never found. I believe to be missing something obvious.

Any suggestions?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 October 2024 20:35 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171/2 "2024-10-04T20:35:13Z")

</div>

Try using msg.payload.state since msg.payload is an object not a string

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [4 October 2024 20:55 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171/3 "2024-10-04T20:55:11Z")

</div>

> [@zenofmud](#):
>
> msg.payload.state

Or is that `msg.payload.PostState.state`?  
Hard to be sure when all we have to go on is a picture, two wires into one debug node and two identically named change nodes 🙃

---

<div class="post-metadata">

### Author: ![goosst](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/goosst/32/95112_2.png) [@goosst](https://discourse.nodered.org/u/goosst)
#### Post date: [5 October 2024 06:42 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171/4 "2024-10-05T06:42:04Z")

</div>

Thanks,  
sorry for confusion, only lower part of screenshot was relevant.

The winning combination turned out to be msg.payload.PostState.state and NA without the "" quotes.  
I probably mistakenly understood "search for" would search through the entire payload automatically.

---

<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: [3 January 2025 06:42 UTC](https://discourse.nodered.org/t/search-for-in-change-node/92171/5 "2025-01-03T06:42:20Z")

</div>

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