How to get elements from Json array in PostgreSQL

后端 未结 3 931
清酒与你
清酒与你 2021-01-31 11:04

I have searched quite much on this and still unanswerable. I\'m using PostgreSQL. Column name is \"sections\" and column type is json[] in below example.

My column looks

3条回答
  •  爱一瞬间的悲伤
    2021-01-31 11:14

    If you wish to access a single element then use json_array -> [index]

    For example, if you have json_arr=[1,2,3] then json_array -> 0 will return 1

提交回复
热议问题