title: How would I interact with a .json database using a Lua script
body: <p>I'm extremely new to Lua coding and only understand the basics. I am trying to make a Lua script where if a player executes a command (/callsign) followed by their desired callsign in the chat (FiveM chat) it will save in a .json database including their name next to their callsign. If the user already has a callsign I would also wish to override their old callsign with their new callsign.</p>
  
  <p>Usage:</p>
  
  <pre><code>/callsign [callsign]
  </code></pre>
  
  <p>Examples:</p>
  
  <pre><code>/callsign RYANAIR-121
  /callsign AIRMALTA-726
  /callsign UNITEDAIRLINES-417
  </code></pre>
  
  <p>I don't have too much to start off with. Please don't spoonfeed me as I would like to learn myself how I would create this script.</p>
  
  <p>Code so far:</p>
  
  <pre class="lang-lua prettyprint-override"><code>    -- Grand Theft Auto Notification Function
      function notify(text)
           SetNotificationTextEntry("STRING")
           AddTextComponentString(text)
           DrawNotification(false, false)
      end
  
      -- Command
      RegisterCommand("Callsign", function(source,args,raw)
           notify("Callsign was successfully set/changed") --Notify user that their callsign was set/changed
      end)
  </code></pre>