https://github.com/tuwukee/ruby-refract
Refract lookup
https://github.com/tuwukee/ruby-refract
Last synced: 12 months ago
JSON representation
Refract lookup
- Host: GitHub
- URL: https://github.com/tuwukee/ruby-refract
- Owner: tuwukee
- License: mit
- Created: 2017-01-23T21:28:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-29T11:54:19.000Z (over 9 years ago)
- Last Synced: 2025-05-30T09:58:00.176Z (about 1 year ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby-refract
Implemenation of recursive search inside JSON structures according to refract document format specification.
## Usage
```
require 'ruby-refract'
api_object = { "element"=>"parseResult", "content" => [{"element"=>"category", "meta"=>{"classes"=>["api"], "title"=>{"element"=>"string", "content"=>"The Simplest API"}}}]}
Refract.search(api_object, { 'element' => 'category' })
```
### Get all resource groups
```
Refract.search(api_object, {
"element" => "category",
"meta" => {
"classes" => [
"resourceGroup",
],
}
})
```