Expecting JSON object instead of JSON Array

2020-04-21 Thread Salah Abdul Gafoor
In my django application with database engine djongo, I'm trying to return a JSON response by retrieving from my database. But, I'm receiving JSON array instead of JSON object. Currently, there is only one record in my database. Please see the code below. model.py class bloodDonors(models.Mode

Expecting JSON object instead of JSON Array

2020-04-21 Thread Salah Abdul Gafoor
In my django application with database engine djongo, I'm trying to return a JSON response by retrieving from my database. But, I'm receiving JSON array instead of JSON object. Currently, there is only one record in my database. Please see the code below. model.py class bloodDonors(models.Mode