Skip to content

xidel, xquery, tuple & download ? #113

@Baltazar500

Description

@Baltazar500

Hi.

How to use xidel within an xquery request to use elements (or variables) of an array (tuple) as a name and link to download a file without using external utilities like curl ? "x:download" because xidel does not support :(

How to use "array[1]" for url to download and "array[2]' for filename ?

echo '[{"a":"https://example.com/example.zip","b":"Filename"}]'|xidel -se 'for $a in parse-json(($raw))() let $array:=(($a).a,($a).b) return $array[1] || " " || $array[2]'

How to use separate variables as a url and filename to download ?

echo '[{"a":"https://example.com/example.zip","b":"Filename"}]'|xidel -se 'for $a in parse-json(($raw))()let $title:=($a).b let $url:=($a).a return $url || " " || $title'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions