Solana DocumentationSurfpoolInfrastructure as CodeStandard Library

JSON Functions

jq

The jq function allows slicing, filtering, and mapping JSON data. See the jq documentation for more details.

Inputs

NameTypeDescription
decoded_jsonstring | objectA JSON object
querystringA JSON query. See the jq documentation

Output

NameTypeDescription
valuearray[string]The result of the jq query
output "message" {
value = jq("{ \"message\": \"Hello world!\" }", ".message")
}
// > message: Hello world!

Is this page helpful?

Table of Contents

Edit Page
© 2026 Solana Foundation. All rights reserved.