Title: WP REST API
Last modified: July 4, 2021

---

# WP REST API

 *  [Chirukin Bogdan](https://wordpress.org/support/users/cheater111/)
 * (@cheater111)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-rest-api-10/)
 * Hi to all, I’m optimized my SPA whitch warked with using wp rest api.
    My question:
   can i(how) selected fields in embedded object?
 * Example of my query:
 *     ```
       '/wp-json/wp/v2/posts?per_page=1&page=1&_embed=wp:featuredmedia'
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [rahulp411](https://wordpress.org/support/users/rahulp411/)
 * (@rahulp411)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-rest-api-10/#post-14625064)
 * db.usertest.aggregate(
    [{$match:{“objects”: {“$elemMatch”:{ “type”: “fruit”,“
   origin”: “XYZ”}}}}, {$project: { “username”:1, “objects.name”:1 }}] ).pretty()
 *  [rahulp411](https://wordpress.org/support/users/rahulp411/)
 * (@rahulp411)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/wp-rest-api-10/#post-14628709)
 * Thank you… [tutuappvip.co](https://tutuappvip.co) [routingnumbers.onl](https://routingnumbers.onl)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP REST API’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [rahulp411](https://wordpress.org/support/users/rahulp411/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/wp-rest-api-10/#post-14628709)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
