Assert a value in the JSON a REST route returns, by its path: slug, title.rendered, status, or 0.slug for the first item of a list.
Examples
Then the REST route "/wp/v2/posts/1" should have "slug" equal to "hello-world"
And the REST route "/wp/v2/posts/1" should have "status" equal to "publish"
Then the REST route "/wp/v2/posts/1" should have "title.rendered" equal to "Hello world!"
And the REST route "/wp/v2/posts?per_page=1" should have "0.type" equal to "post"
Then the REST route "/wp/v2/users/me" should have "slug" equal to "admin"
Pattern
Then(/^the REST route "([^"]*)" should have "([^"]*)" equal to "([^"]*)"$/, …)
Part of @webship-js/wordpress-steps (github.com/webship/wordpress-steps), a step pack for Webship-js 2.0.x.