Write a function that would take this sample data:
[
{ banana: 'fruit' },
{ apple: 'fruit' },
{ carrot: 'vegetable' }
]
| #!/bin/bash | |
| commandExists () { | |
| type "$1" &> /dev/null ; | |
| } | |
| installImageMagick() { | |
| if commandExists brew; then | |
| brew install imagemagick | |
| else |
| #!/bin/bash | |
| # command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb "https://www.apple.com/" | |
| # 2. seq 10 | xargs -Iz ./ttfb "https://www.apple.com/" | |
| curl -o /dev/null \ | |
| -H 'Cache-Control: no-cache' \ | |
| -s \ | |
| -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" \ |
| #!/bin/bash | |
| # command to run apache benchmark tool | |
| # ** usage ** | |
| # ./benchmark "https://www.apple.com/" | |
| curl -X GET "$1" | |
| ab -k -c 20 -n 250 "$1" |
| [ | |
| { | |
| "name": "Loan 1", | |
| "status": "warning", | |
| "attributes": [ | |
| { | |
| "label": "gross facility", | |
| "content": "$3000000" | |
| }, | |
| { |
| { | |
| "base": "GBP", | |
| "history": [ | |
| { | |
| "date": "2021-04-01", | |
| "rates": [ | |
| { | |
| "currency": "EUR", | |
| "value": 5.0611 | |
| } |