# Using kibana saved\_object \_find api and return only selected field from nested json

**URL:** <https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914>\
**Category:** Kibana\
**Created:** [February 25, 2019, 10:41pm UTC](https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914 "2019-02-25T22:41:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)\
**Post date:** [February 25, 2019, 10:41pm UTC](https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914/1 "2019-02-25T22:41:41Z")

</div>

Hi,

I want to be able to getall index-pattern objects and only return their title attribute. However, title is embedded in the attribute json object. How do I do this?

GET api/saved\_objects/\_find?type=index-pattern&fields=attributes.title ?

Example data:

{  
"total": 1,  
"data": [  
{  
"id": "my-pattern",  
"type": "index-pattern",  
"version": 1,  
"attributes": {  
"title": "my-pattern-\*"  
}  
}  
]  
}

[https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html)

---

<div class="post-metadata">

**Author:** ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)\
**Post date:** [March 13, 2019, 3:15am UTC](https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914/2 "2019-03-13T03:15:11Z")

</div>

Hi @preddy75,

The `fields` parameter doesn't need the `attributes.` prefix for the fields, it automatically gets prefixed in the API.

Something like the following should do the trick: `GET api/saved_objects/_find?type=index-pattern&fields=title`.

Hope this helps,  
Mike.

---

<div class="post-metadata">

**Author:** ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)\
**Post date:** [March 13, 2019, 3:16am UTC](https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914/3 "2019-03-13T03:16:38Z")

</div>

Also note there is currently no feature to remove fields outside `attributes` object. Those fields currently always return.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 10, 2019, 3:16am UTC](https://discuss.elastic.co/t/using-kibana-saved-object-find-api-and-return-only-selected-field-from-nested-json/169914/4 "2019-04-10T03:16:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
