title: jq: 1 compile error jq: error: schedule/0 is not defined at <top-level>, line 1: .Christchurch.bus-schedule.from["Weekday"] |= . + ["1646"]
body: <p>I have a react application which uses a .sh file to generate a part of the application. But I have come across an error which prevents the application from reading the data files.</p>
  
  <p>I've looked at versioning, possible syntax changes in the .sh file which is <code>emap.sh</code></p>
  
  <p>This is the <code>.sh</code> file</p>
  
  <pre><code>#!/bin/bash
  object='{}'
  
  find 'public/data' -type f -name '*.csv' | while read -r filename;
  do
      filename=$(echo "$filename" | sed 's/public\/data\///' | sed 's/ /\//')
      city=$(echo "$filename" | cut -d'/' -f1)
      medium=$(echo "$filename" | cut -d'/' -f2)
      direction=$(echo "$filename" | cut -d'/' -f3)
      date=$(echo "$filename" | cut -d'/' -f4)
      time=$(echo "$filename" | cut -d'/' -f5| head -c-5)
      object=$(echo $object | jq -c ".$city.$medium.$direction[\"$date\"] |= . + [\"$time\"]")
      echo $object &gt; public/available.json
  done
  </code></pre>
  
  <p>It should be successful so that when we yarn the application, it shows up having read the data, but we get a page without data in the area using the information that needs to be processed.</p>