Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
append into json
#1
Hi people.

I have this json:
{
	"blocks": [
		{
			"type": "context",
			"elements": [

			]
		}
	]
}
I need to append into tag "Elements" this:
{
  "type": "mrkdwn",
  "text": "My text"
}
The result should be this:
{
	"blocks": [
		{
			"type": "context",
			"elements": [
				{
					"type": "mrkdwn",
					"text": "My text"
				}
			]
		}
	]
}
How I should append into the tag "Element" ?

Thanks
Reply


Messages In This Thread
append into json - by luisbatalla - Mar-08-2020, 10:01 PM
RE: append into json - by scidam - Mar-09-2020, 01:09 AM
RE: append into json - by luisbatalla - Mar-09-2020, 03:09 AM
RE: append into json - by scidam - Mar-09-2020, 07:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  .json overwrites, rather than append?? Clives 12 5,029 Jun-07-2021, 04:13 PM
Last Post: buran
  Append JSON's and write to file faqsap 4 3,050 May-15-2020, 04:20 PM
Last Post: faqsap
  Cant Append a word in a line to a list err "str obj has no attribute append Sutsro 2 2,745 Apr-22-2020, 01:01 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020