get_field_values: Get value of a special field

View source: R/scraping-parsing.R

get_field_valuesR Documentation

Get value of a special field

Description

This function fetches the value of fields in a nested json, no matter on which level. Based on the very popular js, JSON command line processor https://stedolan.github.io/jq/

Usage

get_field_values(input, input_type = "url", jq_syntax)

Arguments

input

the json url

input_type

url when string, response when fetched response (e.g. when using the same response for multiple queries)

jq_syntax

jq filter (test here https://jqplay.org/)

Examples

## Not run: 
"https://lobid.org/resources/search?q=isbn:3596237785&format=json" %>%
get_field_values("gndIdentifier")

## End(Not run)

cutterkom/kabrutils documentation built on July 3, 2022, 4:04 p.m.