using node-red-contrib-dictionary node
node-red-contrib-dictionary 
dictionary node for node-red
A dictionary is a general-purpose data structure for storing a group of objects. It is a set of keys with a single associated value.
Example of dictionary
{
"living": {
"men": "20",
"women": "10",
"children": "3"
},
"nonliving": {
"table": "6"
},
"food items": "10"
}
What this node does:
this node takes a dictionary/json and allows the user to create an other dictionary, based on user keys and values ( path of objects )
Input:
{
"living": {
"men": "20",
"women": "10",
"children": "3"
},
"nonliving": {
"table": "6"
},
"food items": "10"
}
Output:
{
"living men": "20",
"nonliving table": "6"
}

Node config :

Output :

[{"id":"c0aa3cb8c09e1c8a","type":"dictionary","z":"4ff28594e962563c","name":"","listVals":[{"key":"payload.living men","path":"payload.living.men"},{"key":"payload.nonliving table","path":"payload.nonliving.table"}],"x":540,"y":200,"wires":[["eab991f07ea13893"]]}]