# Select part of the msg.payload properties

**URL:** https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480
**Category:** General
**Created:** [5 September 2020 18:51 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480 "2020-09-05T18:51:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Carbar](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@Carbar](https://discourse.nodered.org/u/Carbar)
#### Post date: [5 September 2020 18:51 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/1 "2020-09-05T18:51:27Z")

</div>

From the msg.payload that I previously filtered I am only interested in the properties name and biography. In a Change node I have made three deletes of the properties that don't interest me but it doesn't work. How can I solve it

```auto
{
    "name": "Janese Swanson",
    "biography": "American software developer, Swanson is famous for founding Girl Tech, a company for making technology more interesting to women. At the age of 15, she started working as a salesperson in the television and sound system department at Sears. Her experience in sales came in handy when she became the manager of the technology department at a store called My Child’s destiny. She did her certifications in computers from Berkeley and a Ph.D before creating Girl Tech.",
    "Files::file": "https://xxxxxxxxxxxxx.com/Streaming_SSL/Additional_1/DFFCE0F44C07A474B76915A9D0349514AEEF938D053D8C3798DBB397B8A98ED9.jpg?RCType=EmbeddedRCFileProcessor",
    "Settings::server": "",
    "Settings::version": "1.0.0"
}

```

 ![Captura de pantalla 2020-09-05 a las 20.30.57](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/382e9df7b61681d3ee51e9d709b797f368f0fb24.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 September 2020 18:57 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/2 "2020-09-05T18:57:11Z")

</div>

That won't work.

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

Then use the copy path button and paste the path into the switch delete line.

---

<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: [5 September 2020 19:47 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/3 "2020-09-05T19:47:03Z")

</div>

Why do you want to go to the effort of deleting them?

---

<div class="post-metadata">

### Author: ![Carbar](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@Carbar](https://discourse.nodered.org/u/Carbar)
#### Post date: [6 September 2020 10:17 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/4 "2020-09-06T10:17:28Z")

</div>

I program with FileMaker and last month I discovered Node-Red also had news of node-red-contrib-filemaker. Basically I am testing how I could import and export data through MQTT to other applications.

@Colin The find that I do to the FileMaker Api returns I only need name and biography. That's why I delete the ones I don't use from the same block.

```auto
{
    "layout": "people",
    "query": {
        "name": "janese"
    },
    "find": {
        "dataInfo": {
            "database": "FileMaker-of-Things",
            "layout": "People",
            "table": "People",
            "totalRecordCount": 15,
            "foundCount": 1,
            "returnedCount": 1
        },
        "data": [
            {
                "fieldData": {
                    "name": "Janese Swanson",
                    "biography": "American software developer, Swanson is famous for founding Girl Tech, a company for making technology more interesting to women. At the age of 15, she started working as a salesperson in the television and sound system department at Sears. Her experience in sales came in handy when she became the manager of the technology department at a store called My Child’s destiny. She did her certifications in computers from Berkeley and a Ph.D before creating Girl Tech.",
                    "Files::file": "https:// **************.com/Streaming_SSL/Additional_1/0FD82DE24F273556DFE1761FD5BFC55749C2331653E37A27EE7C8A4A03A12E0C.jpg?RCType=EmbeddedRCFileProcessor",
                    "Settings::server": "",
                    "Settings::version": "1.0.0"
                },
                "portalData": {},
                "recordId": "7",
                "modId": "7"
            }
        ]
    }
}

```

@Steve-Mcl The path I use is the same that I would use in FileMaker, which I have not taken into account that with the set I have already restricted the msg.payload.The right thing to do is Delete: msg.payload["Files::file"]

I don't know if there is another way to do it, but I thought that with the Change node it would be useful.

---

<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: [6 September 2020 10:34 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/5 "2020-09-06T10:34:09Z")

</div>

Be very careful if you delete entries from an existing object. Remember that javascript uses pass by reference, so when you delete properties from an object you may be deleting them from the original instance of that data, not just what you might think is a copy that you are passing down the chain. If that is not a problem in this case then ok.

---

<div class="post-metadata">

### Author: ![Carbar](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@Carbar](https://discourse.nodered.org/u/Carbar)
#### Post date: [6 September 2020 11:13 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/6 "2020-09-06T11:13:26Z")

</div>

This is not the case. Thank you for the clarification

---

<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: [5 November 2020 11:13 UTC](https://discourse.nodered.org/t/select-part-of-the-msg-payload-properties/32480/7 "2020-11-05T11:13:27Z")

</div>

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