Key / value pair schema field support


#1

I’m using a Tags field.

The data gets saved in the JSON like this:

"data": {
                "categories": {
                    "iv": [
                        "Cats",
                        "Dogs",
                        "Rabbits"
                    ]
                },
}

But I would like to have key / value pairs instead so that I can work with the data in c# by using the keys/IDs instead of the values/strings.:

Key Value
1     Cats
2     Dogs
3     Rabbits

Is this possible? If not it would be nice to have such a field type.

I could use an Array field with References field types in it but then I would need to have the same schema in two different apps. And it’s bad practice to duplicate content.

The best thing would be if I could use an Array field with References field and reference pages in another app. But as of now that functionality is not supported in Squidex?

@Sebastian maybe you have a workaround for this? Maybe with the Json field or using some other combo? As long as I can avoid duplicate content.


#2

Or maybe I can just use the String field in an array. Gonna try it out.


#3

Not really what I wanted with the String field in an Array. Testing some other variations.


#4

Or maybe I need a custom editor?


#5

I don’t understand this

I


#6

Actually I think my data design was off.
So disregard that part.
I think what I actually need is a one to one-to-many relationship and the References field covers this so that’s all I need. Thanks.


#7

How about this: