[OBSOLETE] Key / value pair schema field support

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.

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

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

Or maybe I need a custom editor?

I don’t understand this

I

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.

1 Like

How about this: