On 05/06/2022 07.06, Koushik Romel wrote:
I want those #One and #Two to be in curly braces {} and not as square bracket [] , and Thanks in advance

A good start would be to understand what the difference between square brackets and curly braces is. The JSON format is very simple:

https://en.wikipedia.org/wiki/JSON#Syntax

So you actually want to convert your array to an object with anonymous properties/members. That doesn't really make any sense and wouldn't be valid JSON.

Of course you could write a dirty hack and do it anyway but I seriously doubt that's really what you want.

Hope that helps.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/037892b5-b138-3a5e-7ae4-16a2bf05d9bf%40stacktrace.dk.

Attachment: OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to