# Json response / records without "resource" and document id

**URL:** <https://community.dreamfactory.com/t/json-response-records-without-resource-and-document-id/2511>\
**Category:** REST API\
**Created:** [April 8, 2016, 10:06pm UTC](https://community.dreamfactory.com/t/json-response-records-without-resource-and-document-id/2511 "2016-04-08T22:06:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_menon](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@m\_menon](https://community.dreamfactory.com/u/m_menon)\
**Post date:** [April 8, 2016, 10:06pm UTC](https://community.dreamfactory.com/t/json-response-records-without-resource-and-document-id/2511/1 "2016-04-08T22:06:43Z")

</div>

How do I prevent the REST API from returning the Document Id (in this case its from MongoDB) in the result? As a matter of fact I would just want to fetch the value of “geojson”, without even needing to have the fieldname in the result. Is that possible? Thanks

I would want this result  
`{"resource":[{"_id":"5708290f7d57d023123c9873","geojson":{"geometry":{"type":"Point","coordinates":[103.697455,1.3547433]},"type":"Feature","properties"}`

to look like this  
`{"geometry": {"type": "Point", "coordinates": [103.697455, 1.3547433]}, "type": "Feature", "properties"}`

I know I can manipulate it once I get it but can I use the API itself to return it in the format shown above?

---

<div class="post-metadata">

**Author:** ![andersonmuller](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@andersonmuller](https://community.dreamfactory.com/u/andersonmuller)\
**Post date:** [April 11, 2016, 11:55pm UTC](https://community.dreamfactory.com/t/json-response-records-without-resource-and-document-id/2511/2 "2016-04-11T23:55:01Z")

</div>

Hi @m_menon,

To remove the “resource” wrapper, set **always\_wrap\_resources** to false in this two files:  
{DF\_ INSTALATION}/apps/dreamfactory/htdocs/config/df.php  
and  
{DF\_ INSTALATION}/apps/dreamfactory/htdocs/bootstrap/cache/config.php

To receive just the fields you want, use the **fields** param in your REST URL ex.:  
GET [http://localhost:8080/api/v2/mongodb/\_table/teste?fields=coordinates,type](http://localhost:8080/api/v2/mongodb/_table/teste?fields=coordinates,type)

I hope this helps! 🙂

---

<div class="post-metadata">

**Author:** ![m\_menon](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@m\_menon](https://community.dreamfactory.com/u/m_menon)\
**Post date:** [April 12, 2016, 6:31am UTC](https://community.dreamfactory.com/t/json-response-records-without-resource-and-document-id/2511/3 "2016-04-12T06:31:01Z")

</div>

Great thanks 👍😌
