I have to manipulate this data structure in Ruby. I don't know what's is the name of this syntax. And what is the Ruby gem to process it.
(
spellCorrectionEnabled:true,
recentSearchParam:(
id:2098298945,
doLogHistory:true
),
filters:List(
(
type:REGION,
values:List(
(
id:102748797,
text:Texas%2C%20United%20States,
selectionType:INCLUDED
)
)
),(
type:COMPANY_TYPE,
values:List(
(
id:G,
text:Government%20Agency,
selectionType:INCLUDED
)
)
)
),
keywords:Texas
)
More insights
I have to write a Ruby script to process a LinkedIn search like this:
https://www.linkedin.com/sales/search/people?query=(spellCorrectionEnabled%3Atrue%2CrecentSearchParam%3A(id%3A2098298945%2CdoLogHistory%3Atrue)%2Cfilters%3AList((type%3AREGION%2Cvalues%3AList((id%3A102748797%2Ctext%3ATexas%252C%2520United%2520States%2CselectionType%3AINCLUDED)))%2C(type%3ACOMPANY_TYPE%2Cvalues%3AList((id%3AG%2Ctext%3AGovernment%2520Agency%2CselectionType%3AINCLUDED))))%2Ckeywords%3ATexas)&sessionId=6TwMT4RnQoK7HiG1NZnIGw%3D%3D&viewAllFilters=true
The querystring has one parameter only: query
.
I get the value of such a query
parameter using this script:
url = o.url
uri = URI.parse(url)
params = CGI.parse(uri.query)
query = params['query'].first