Search notes:

jq: range

$ jq -n 'range(5)'
0
1
2
3
4
5
$ jq -n '[range(3)]'
[
  0,
  1,
  2
]
Compare the following command with jq -n {id: (1,2,3)} (which returns the same result):
$ jq -n '{id: range(3) }'
{
  "id": 0
}
{
  "id": 1
}
{
  "id": 2
}
$ jq -n '{x: range(2), y: range(2) }'
{
  "x": 0,
  "y": 0
}
{
  "x": 0,
  "y": 1
}
{
  "x": 1,
  "y": 0
}
{
  "x": 1,
  "y": 1
}

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1738303344, '3.140.188.201', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/JavaScript/JSON/tools/jq/operators-functions/range(76): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78