Hello,
I'm trying to merge data into a hard-coded y-axis and I need to connect Y axis names to multiple keys, I'll this part of code so you can get a better understanding:
"name": "some_name",
"values": [
{"a": "name1", "c": "key1"},
{"a": "name2", "c": "key2"},
{"a": "name3", "c": "key3"},
],
"transform": [
{
"type": "lookup",
"from": "my_data",
"key": "original_key",
"fields": ["c"],
"values": ["some_value"]
Now some additional info about my data: the "original_key" field I'm getting from my_data has multiple string values (key1,key2,key3....keyN) which are connected to integer values in "some_value". My main goal is to get name1 to obtain data from more than key1, as well as name2 and name3 I want them to get data from more than 1 key as well. In the end I'm trying to achieve something like that :
"name": "some_name",
"values": [
{"a": "name1", "c": ["key1","key12"]},
{"a": "name2", "c": ["key2","key22","key31"]},
{"a": "name3", "c": ["key3","key7","key8","key9","key14"]},
],
"transform": [
{
"type": "lookup",
"from": "my_data",
"key": "original_key",
"fields": ["c"],
"values": ["some_value"]
I also tried this:
"name": "some_name",
"values": [
{"a": "name1", "c": "key1"},
{"a": "name1", "c": "key12"},
{"a": "name2", "c": "key2"},
{"a": "name2", "c": "key22"},
{"a": "name3", "c": "key3"},
{"a": "name3", "c": "key33"},
{"a": "name3", "c": "key19"},
],
"transform": [
{
"type": "lookup",
"from": "my_data",
"key": "original_key",
"fields": ["c"],
"values": ["some_value"]
But it did not work and data for each name where there were more than 1 key value just went on top of each other.
Sorry for my poor explanations, I will try to answer any questions, thank you