Map values from datastore to varibale

What are you trying to achieve?

Hello,
I have a mapping of this sort in a datastore :
a = x
b = y
c = z
I would like to output some of of these values using Search records from Datastore module.
For exemple, if i input b & c, i would like the module to output y & z.
Then, i’m trying to use the output values, in another module, for exemple a Set variable :
Variable 1

  • Variable name : b
  • Variable value : value of b (which would be y)

Variable 2

  • Variable name : c
  • Variable value : value of c (which would be z)

The result i get from the Search records is satisfying but i have to transform it, and it’s where i struggle.

Steps taken so far

I tried using array aggregator which output a list of my results, but i struggle using the array created.
Is there another way ?

Thank you !

Screenshots: scenario setup, module configuration, errors

@Gaspard1
Hi, I read the text many times and could not figure out what you were trying to accomplish.

The result i get from the Search records is satisfying but i have to transform it, and it’s where i struggle.

What are you referring to when you say transform? Can you please explain clearly what you want to convert and to what state?

By thinking about it, i just need to retrieve the output of the search records in a json of this type :

{
     "b": "y",
     "c": "z"
}

I guess i have to keep the array aggregator but i don’t know what to do about the rest :thinking:

@Gaspard1
It would be possible to achieve this by having the module placed as shown in the following image. I have also pasted images of each module and Filter settings for your reference.

Config

Repeater: using __IMTAGGLENGTH__ as repeats max number.

Filters: when you aggregate text, json do not need comma in last loop.

Text Aggregator: aggregate text to create a JSON.

Set & Get Variable: