<p>I am trying to update a complex object via a path value which it appear ReJson can do.
I have used it as a Cache just fine, I want to use it as a json collection store for real time data (similar to mongodb).</p>
<p>for example:
{
&quot;name&quot;: &quot;Michael \u0027Mike D\u0027 Diamond&quot;,
&quot;employeeID&quot;: &quot;E#101&quot;,
&quot;role&quot;: &quot;Cleaner&quot;,
&quot;location&quot;: {
&quot;longitude&quot;: -2.552079,
&quot;lattitude&quot;: 51.501335
},
&quot;numberOfAssignedJobs&quot;: 5
}</p>
<p>For example I want to update <strong>location.lattitude</strong> without taking the whole object and dealing with read/write sync issues.</p>
<p>However I am struggling with the API/How it is used in kubernetes. If anyone has any example code or tips and tricks, anything is much appreciated.</p>
<p>Thanks,
Matt</p>

<p>You can do this with the <code>JSON.GET</code> command and JSON path syntax (<a href="https://redis.io/docs/stack/json/path/" rel="nofollow noreferrer">docs here</a>)</p>
<p>First, save the document in Redis at key &quot;jsondoc&quot;:</p>
<pre><code>127.0.0.1:6379&gt; json.set jsondoc $ '{ &quot;name&quot;: &quot;Michael \u0027Mike D\u0027 Diamond&quot;, &quot;employeeID&quot;: &quot;E#101&quot;, &quot;role&quot;: &quot;Cleaner&quot;, &quot;location&quot;: { &quot;longitude&quot;: -2.552079, &quot;latitude&quot;: 51.501335 }, &quot;numberOfAssignedJobs&quot;: 5 }'
</code></pre>
<p>Atomically update path <code>location.latitude</code> to some other value:</p>
<pre><code>127.0.0.1:6379&gt; json.set jsondoc $.location.latitude 52.014
OK
</code></pre>
<p>Retrieve just <code>location.latitude</code>:</p>
<pre><code>127.0.0.1:6379&gt; json.get jsondoc $.location.latitude
&quot;52.014&quot;
</code></pre>
