Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "participants": [
- {
- "name": "xxxx"
- },
- {
- "name": "xxxx"
- }
- ],
- "messages": [
- {
- "sender_name": "xxxx",
- "timestamp_ms": 1xxxx,
- "content": "xxxx",
- "type": "xxxx"
- },
- {
- "sender_name": "xxxx",
- "timestamp_ms": xxxx,
- "content": "xxxx",
- "type": "xxxx"
- }
- ],
- "title": "xxxx",
- "is_still_participant": xxxx,
- "thread_type": "xxxx",
- "thread_path": "xxxxx"
- }
- psql
- select ab.value, tb.messagenumber, message:: json ->> 'title' as title
- FROM public.ImportTable as tb, json_array_elements(message:: json ->
- 'messages') as ab
- Message array 1 | MessageID 1|Title 1
- Message array 2 | MessageID 1|Title 1
- Message array 3 | MessageID 1|Title 1
- Message array 4 | MessageID 1|Title 1
- Message array 1 | MessageID 2|Title 2
- Message array 2 | MessageID 2|Title 2
- psql
- SELECT * FROM public.jsonmessage as tb, json_each_text(Message array::
- json)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement