0

Is there any guarantee that JSONB keep the order of json properties in which they were inserted?

Update: In Docs, I found it sort json keys for efficiency.

What should i do if i gonna a key always be the first one?

Ali Zeinali
  • 551
  • 4
  • 16

1 Answers1

0

What should i do if i gonna a key always be the first one?

The option is to use json field in YSQL which only does validation on insert.

While on YCQL, you have to use TEXT column and do the conversion manually.

dh YB
  • 965
  • 3
  • 10
  • What if i put $ at the beginning of key name which i want to be first field? It should work if it is sorting fields base on characters unicode(string sort). – Ali Zeinali Feb 04 '20 at 10:57