Store payload value and match previous values

Hi all!

I need to store two values from two differents payloads let's say:

Value 1

payload: object
  event_name: "defect.created"
  payload: object
     id: 99

Value 2

payload: object
   case_number: 53234

Ok, i can retrieve id value from VALUE 1 perfectly but i need to store it somewhere so it can match case_number from VALUE 2.
In this case id 99 should be matched with case_number 53234.

Is there any place where i can store them and make them match?.

Regards!

You can use a change node and store values in context.

You can use a file node and write it to file

You can use database nodes and write to database.

Uhm ok.

I see that change node doesn't allow me to store the value anywhere.

image

I saw that previous versions of nodered there is a disk drive icon where you can select the output source where you want to store the value.

By selecting flow.whatever_you_desire you have chosen to store a value in flow context named whatever_you_desire.

This might help you: Working with context : Node-RED

Maybe i will use google sheet to store data and then retrieve it when i need it. I will try it.
Tks!

You have to define the alternative context storage options in settings.js in order for that disk icon to appear... maybe that hasn't happened on this latest installation ?

Yes, i know that. But i dont want to touch the filesystem because is an enterprise server. So i decided to use context with flow setting and persist it in memory.