when add index.processed.css ,why use .processed not .css directly?

in codepen forks there is an example of ALIGN4GAME hen he use html and javascript as aways ,he use stylesheet index.sass and index.proceesed.css while the connected stylesheet in the html code is index.processed.css i ,cant see the connection between using index.saas and using the prefix .processed.css and why to use it

tring the code offline and it didnt work and didnt appear in the same way as it online on the codepen fork

Displaying nested object in console using Node.js

I’m making simple linked List implementation in JS and using Node.js to see the results in the console.When I want to display nested object like LL using console.log I get
LinkedList {head: Node} and when I want to see more I get “No debugger available, can not send ‘variables'” I understand that it’s because no debugging is currently happening but I remember being able to expand the results of array etc.I can use json.stringify() but the result is not very easily readable.

So,are there any ways to display full object in Node?

JavaScript PDF generator will not load image

Working on a Django project, basically this function is supposed to generate a printable PDF when the button click calls it. It works, apart from the fact the image (company logo) will not show in the PDF. Any idea where I am going wrong? Here is my function:

        <script>
            $(document).ready(function () {
                $('#cmd').click(function () {
                    var element = document.querySelector("#pdf");
                    var button = document.getElementById("cmd");
                    button.style.display = 'none'; // Hide the button

                    html2canvas(element, {
                        onrendered: function(canvas) {
                            var imgData = canvas.toDataURL('image/png');
                            var pdf = new jsPDF('p', 'mm', 'a4');
                            var imgWidth = 210;
                            var pageHeight = 297;
                            var imgHeight = canvas.height * imgWidth / canvas.width;
                            var heightLeft = imgHeight;
                            var position = 0;

                            pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
                            heightLeft -= pageHeight;

                            while (heightLeft >= 0) {
                                position = heightLeft - imgHeight;
                                pdf.addPage();
                                pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
                                heightLeft -= pageHeight;
                            }
                            pdf.save('sample-file.pdf');
                            button.style.display = 'block'; // Show the button again
                        }
                    });
                });
            });


         </script>

convert static on click event to dynamic MVC

I have a static href link which when click its do some scripts action and work fine but when move code to dynamic MVC its run complication error how to turn it to dynamic MVC as the below static code

<a href=”javascript:;” class=”collapse-icon flex h-8 w-8 items-center rounded-full transition duration-300 hover:bg-gray-500/10 rtl:rotate-180 dark:text-white-light dark:hover:bg-dark-light/10″ @click=”$store.app.toggleSidebar()”>

Is there a reason javascript works in one folder and does not in another folder on the same webserver?

Good day stackers,

Can anyone help me figure out why a simple javascript onchange function works in one folder but does not work in another folder on the same webserver (cPanel v120.0.16).

The links below would redirect you to the not working and working folder.

Not Working Folder

Working Folder

Both folders have the same permissions and type. Both folders contain the test.php file with the same code as below

<!DOCTYPE html>
<html>
<body>

<p>Select a new car from the list.</p>

<select id="mySelect" onchange="myFunction()">
  <option value="Audi">Audi</option>
  <option value="BMW">BMW</option>
  <option value="Mercedes">Mercedes</option>
  <option value="Volvo">Volvo</option>
</select>

<p>When you select a new car, a function is triggered which outputs the value of the selected car.</p>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("mySelect").value;
  document.getElementById("demo").innerHTML = "You selected: " + x;
}
</script>

</body>
</html>


Any pointers or solutions would be of immense help.
Warm Regards

Jquery tooltip image

I am using Jquery tooltip with an image and fgor a reason I do not understand it does not show the tooltip:

HTML:

<a id="LAB_BBQ" href="#" style="cursor:help">CADAC Campinggaz</a><br>
<a id="LAB_CAMPSET" href="#" style="cursor:help">Campeerset</a><br>
<a id="LAB_KEUKEN" href="#" style="cursor:help">Buitenkeuken</a><br>
<a id="LAB_REINIG" href="#" style="cursor:help">Vrijstelling</a><br>

And Javascript


    $(function(){
        $('a').each(function(index) {
            id=$(this).attr('id');
            if (id>""){
                pref=id.substr(0, 4);
                if (pref=='LAB_'){
                    kode=id.substr(4);
                    kode=kode.toLowerCase();
                    chk="#OPT_"+kode;
                    bestand={content: '', opacity: 1};
                    sid="#"+id;
                    console.log(sid,bestand);
                    $(sid).tooltip(bestand);
                    $(chk).tooltip(bestand);
                }
            }
        });
    });

The code is executed (vivible by “console.log”) for each anchor, but I do not see a tooltip (mentionned .JPG files do exist and are accessible).
I am missing something, but I do not see what

Consume API endpoint from Laravel + Inertia App

I have an App created with Laravel with InertiaJS and VueJS. It is set with all the Jetstream scaffolding for the Authentication, everything from the auth is handled by jetstream and inertia.

The problem is that I have a couple of pages that need to call the api.php routes in my project, for example in my Vue.JS page:

fetch(`/api/v1/companies/${this.user.id}`)
    .then(response => response.json())
    .then(res => {
           console.log(res)
});

And this is a simple endpoint in my api.php:

Route::get('/companies/{user_id}', [Controller::class, 'index']);

How can I make this endpoint auth protected, so only authenticated users get access (like with Laravel Sanctum), but in the Inertia environment? Is there a way to put this endpoint behind a middleware and send a token from the Vue.JS page?

Convert crypto.privateEncrypt NodeJs to usage of some JS library

I’m trying to sign the message using the RSA algorithm within the Postman pre-request script. Unfortunately, this blocks the ability to use the NodeJs crypto library and web API. However, I have a code snippet on NodeJs that does the signing in the way required by the third party verification.

const crypto = require('crypto');

const message = 'Sample text';

const privateKeyPem = `-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQCyB20jNtJ40e1q1tytVQXu9r1cEfhzUU6N3vKZozTf0yaDAdUS
wZZXsjEFQ7ZdlUmJHSmwPcHUYgZWGBkWA+NEvawFpu6Kxs7ST1c97d9ZaziIlKzk
qy52mOlKNBSLGO17F5F5WufoqKdGEijd+tU2Mev041C6xb0urpbmpJbUGQIDAQAB
AoGBAKfRXE2/lfOSYC1AUVGLPkaejK3Hut5pnJUbvrCZKnR7BGimR4aguen87Ty7
MaNR4LnBpdSewqJDrRlnKe6Yx5goXNRYMOS6Rkk4dECv5xlxdF2P4xShNM/Deo1Y
lTekkkRyA0GqrI1JW7RJIlL7qF8iL4qDZZRsbXZEUWWbtZ+JAkEA2xe/YCA50Pvh
qAN5XvNWLk8jbTov1cbbOIUKjlgqeZkvj+pHlR3PjHQDOtTliy49sixL0BEg/aO3
WjzHnmEF+wJBANAE0891FA6d4DDsJlYeXyWMonDd0sJreSndgM0IssNXAls1Clke
pDhh+wY+DIR1BochWFtkkJUMJzRc3V9bNfsCQQDVMhWjF5jLON/MG51WfRnmtFG3
70AvGXOnWyb7fuXOL/dtZr/DZh/Z/+ZIsHSx7AxTPfGEBbcBufcoky54etdTAkEA
iDIw8Aqq2Csb50wmiYoXJ8GddaJ25J5zVSrWsue4C1eDjm362YDLarMUJPEpRuxM
GtuFO0lrtHqhjJIkytMwUwJAEzfTlsqXd4Gx4BghVhxAM0JX+Y7XAmgg/3aJlaAa
jqKI2NqXA6gnQIKC2FY8/WEQZg3TivE4AKw9sYHKR9BBKA==
-----END RSA PRIVATE KEY-----`;

const privateKey = crypto.createPrivateKey({
    key: privateKeyPem,
    format: 'pem',
    type: 'pkcs1'
});

const payloadHash = crypto.createHash('sha256').update(message).digest('hex');
console.log(`SHA256: ${payloadHash}`);

const encryptedBase64 = crypto.privateEncrypt(privateKey, Buffer.from(payloadHash, 'utf8')).toString('base64');
console.log('Encrypted:', encryptedBase64);

So, I would be grateful if you could help me find a solution as to how similar logic can be done without NodeJs crypto and web API using only JavaScript libraries.

I’ve already tried several JavaScript libraries, but the results are different. Below I’ll provide a snippet using node-forge. The results do not match the first snippet.

const forge = require('node-forge');

const privateKeyPem = `-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQCyB20jNtJ40e1q1tytVQXu9r1cEfhzUU6N3vKZozTf0yaDAdUS
wZZXsjEFQ7ZdlUmJHSmwPcHUYgZWGBkWA+NEvawFpu6Kxs7ST1c97d9ZaziIlKzk
qy52mOlKNBSLGO17F5F5WufoqKdGEijd+tU2Mev041C6xb0urpbmpJbUGQIDAQAB
AoGBAKfRXE2/lfOSYC1AUVGLPkaejK3Hut5pnJUbvrCZKnR7BGimR4aguen87Ty7
MaNR4LnBpdSewqJDrRlnKe6Yx5goXNRYMOS6Rkk4dECv5xlxdF2P4xShNM/Deo1Y
lTekkkRyA0GqrI1JW7RJIlL7qF8iL4qDZZRsbXZEUWWbtZ+JAkEA2xe/YCA50Pvh
qAN5XvNWLk8jbTov1cbbOIUKjlgqeZkvj+pHlR3PjHQDOtTliy49sixL0BEg/aO3
WjzHnmEF+wJBANAE0891FA6d4DDsJlYeXyWMonDd0sJreSndgM0IssNXAls1Clke
pDhh+wY+DIR1BochWFtkkJUMJzRc3V9bNfsCQQDVMhWjF5jLON/MG51WfRnmtFG3
70AvGXOnWyb7fuXOL/dtZr/DZh/Z/+ZIsHSx7AxTPfGEBbcBufcoky54etdTAkEA
iDIw8Aqq2Csb50wmiYoXJ8GddaJ25J5zVSrWsue4C1eDjm362YDLarMUJPEpRuxM
GtuFO0lrtHqhjJIkytMwUwJAEzfTlsqXd4Gx4BghVhxAM0JX+Y7XAmgg/3aJlaAa
jqKI2NqXA6gnQIKC2FY8/WEQZg3TivE4AKw9sYHKR9BBKA==
-----END RSA PRIVATE KEY-----`;

const message = 'Sample text';

const privateKey = forge.pki.privateKeyFromPem(privateKeyPem);

// Create a message digest (hash)
const md = forge.md.sha256.create();
md.update(message, 'utf8');

// Sign the digest
const signature = privateKey.sign(md);

// Encode the signature (e.g., Base64)
const signatureBase64 = forge.util.encode64(signature);

console.log('Signature (signature):', signatureBase64);

Getting error while accessing controls property of FormArray in Angular reactive form inside template.html

As new to Angular(14) i am facing this issue in reactive form while trying to access contorls property of formArray in template file although i am able to access other property like value in the template, so i have few question:-

1 why i am able to access value property but not controls property in the view file and what is the reason behind it?

The error which i am getting is -> Property ‘controls’ does not exist on type ‘AbstractControl<any, any>’.
<ng-container *ngFor=”let skill of reactiveForm?.get(‘skills’)?.controls”>

After seeing the error message i added a condition thought it will prevent the issue ->


    <ng-container *ngIf="reactiveForm?.get('skills')?.hasOwnProperty('controls')">
     <ng-container *ngFor="let skill of reactiveForm?.get('skills')?.controls">
     </ng-container>
    </ng-container>

2 Even after adding the condition why i am getting the same error?

HERE IS FULL CODE.

Ts file ->


    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.scss'],
    })
    export class AppComponent implements OnInit {
      title = 'reactive-form';
      reactiveForm!: FormGroup;
    
      get skillsControls() {
        return (this.reactiveForm.get('skills') as FormArray).controls;
      }
    
      ngOnInit() {
        this.reactiveForm = new FormGroup({
          // Grouping form
          personalDetails: new FormGroup({
            firstname: new FormControl(null, Validators.required),
            lastname: new FormControl(null, Validators.required),
            email: new FormControl(null, [Validators.required, Validators.email]),
          }),
          gender: new FormControl('male'),
          country: new FormControl('india'),
          hobbies: new FormControl(null),
          skills: new FormArray([
            new FormControl('Cricket'),
            new FormControl('Football'),
            new FormControl('Rugby'),
          ]),
        });
      }
      onSubmit() {
        console.log(this.reactiveForm);
        console.log(this.reactiveForm?.get('skills'));
      }
    }

Template file ->


    <div class="form">
      <h2 id="registration">Ragistration Form</h2>
      <form action="" [formGroup]="reactiveForm" (ngSubmit)="onSubmit()">
    
       <!-- Removed other form fields... -->
    
       <div formArrayName="skills">
          <!-- Able to access value property -->
    
          <!-- <ng-container *ngFor="let skill of reactiveForm.get('skills')?.value">
            <input type="text" placeholder="add skill.." [value]="'skill'">
          </ng-container> -->
    
          <!-- Getting Error -->
          <ng-container *ngIf="reactiveForm?.get('skills')?.hasOwnProperty('controls')">
            <ng-container *ngFor="let skill of reactiveForm?.get('skills')?.controls">
              <input type="text" placeholder="add skill.." [value]="'skill'">
            </ng-container>
          </ng-container>
    
          <!-- Solved issue using getter -->
          <!-- <ng-container *ngFor="let skill of skillsControls; let i = index">
            <input type="text" placeholder="add skill.." [formControlName]="skill">
          </ng-container> -->
        </div>
        <input type="submit" value="Submit" id="btn">
      </form>
    </div>

Wanted to understand the problem and how we can solve this (without using getter function).

Waiting for element to rererender

Take this piece of code:

document.querySelector(":root").style.setProperty("--image-size", "100px");
console.log(document.querySelector("#item").offsetHeight);

And this stylesheet:

:root {
  --image-size: 10px;
}

#item {
  width: var(--image-size);
}

The output of the javascript code will be 19. What I was expecting is 190.

This is because the element hasn’t rerendered yet. I have found another issue where the solution was to wait for one animation frame. Updated code looks like this:

document.querySelector(":root").style.setProperty("--image-size", "100px");
requestAnimationFrame(() => {
 requestAnimationFrame(() => {
   console.log(document.querySelector("#item").offsetHeight);
  }):
});

This still outputs 19. Am I missing something here? How can I wait for the element to rerender in this case?

A proper way to install leaflet in Nuxt/Vue

I’m trying to install leaflet in my Nuxt 3 project without the use of wrappers like @nuxtjs/leaflet, however it says ‘Could not find a declaration file for module ‘leaflet’, although I installed the leaflet package from npm.

//template
<div id="map"></div>

//script
<script setup lang="ts">
import * as L from "leaflet";

onMounted(() => {
    const map = L.map("map").setView([34.299074, -118.45949], 13);
    L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
        maxZoom: 19,
        attribution:
            '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    }).addTo(map);
    L.marker([34.299074, -118.45949]).addTo(map);
});
</script>

Then I add a css file in nuxt.config.ts:

css: [
    "leaflet/dist/leaflet.css",
],

All I get right now is the empty map with zoom in/out buttons and the title ‘Leaflet | © OpenStreetMap’ in the bottom-right corner.

Looking for a possible solution.

Highcharts Implementing Persistent Click Tooltip Behavior with External Click Detection

In my project, I have two tooltips: one that appears when hovering over a point and another that appears when clicking on a point.
The hover tooltip is working as expected.
However, the tooltip that should appear when clicking on a point is not behaving as I want.
I want this tooltip to remain open even if the user hovers over other points or moves the mouse outside the tooltip area.
The tooltip should only disappear when the user clicks outside of it.
Could you help me with this?
u can use this fiddle

How do I extract a specific object/variable from JSON in JavaScript [duplicate]

I have no clue how Javascript works TBH I am a C user. Attached is the JSON file I am using and the code I used to create it from a Minecraft NBT file. All I need from the NBT file is value.data.value.player.pos.value
and
value.data.value.SizeOnDisk.value

const fs = require('fs')
const nbt = require('prismarine-nbt')

async function main(file) {
    const buffer = fs.readFileSync(file)
    const { parsed, type } = await nbt.parse(buffer)
    var nbtjson = JSON.stringify(parsed, null, 2);
    fs.writeFile("test.json", nbtjson, function(err) {
        if (err) {
            console.log(err);
        }
    });
    console.log(nbtjson);
    fs.createWriteStream('level.nbt').write(nbt.writeUncompressed(parsed, type)) // Write it back 
}
main('level.dat')
{
  "type": "compound",
  "name": "",
  "value": {
    "Data": {
      "type": "compound",
      "value": {
        "RandomSeed": {
          "type": "long",
          "value": [
            552912282,
            -1301880156
          ]
        },
        "Player": {
          "type": "compound",
          "value": {
            "Motion": {
              "type": "list",
              "value": {
                "type": "double",
                "value": [
                  0,
                  -0.0784000015258789,
                  0
                ]
              }
            },
            "SleepTimer": {
              "type": "short",
              "value": 0
            },
            "SpawnY": {
              "type": "int",
              "value": 68
            },
            "Health": {
              "type": "short",
              "value": 20
            },
            "SpawnZ": {
              "type": "int",
              "value": 7
            },
            "SpawnX": {
              "type": "int",
              "value": -890
            },
            "Air": {
              "type": "short",
              "value": 300
            },
            "OnGround": {
              "type": "byte",
              "value": 1
            },
            "Dimension": {
              "type": "int",
              "value": 0
            },
            "Rotation": {
              "type": "list",
              "value": {
                "type": "float",
                "value": [
                  1891.9993896484375,
                  31.350006103515625
                ]
              }
            },
            "FallDistance": {
              "type": "float",
              "value": 0
            },
            "Score": {
              "type": "int",
              "value": 0
            },
            "Sleeping": {
              "type": "byte",
              "value": 0
            },
            "Pos": {
              "type": "list",
              "value": {
                "type": "double",
                "value": [
                  -887.5,
                  69.62000000476837,
                  7.5
                ]
              }
            },
            "DeathTime": {
              "type": "short",
              "value": 0
            },
            "Fire": {
              "type": "short",
              "value": -20
            },
            "HurtTime": {
              "type": "short",
              "value": 0
            },
            "AttackTime": {
              "type": "short",
              "value": 0
            },
            "Inventory": {
              "type": "list",
              "value": {
                "type": "compound",
                "value": [
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 0
                    },
                    "id": {
                      "type": "short",
                      "value": 267
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 2
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 1
                    },
                    "id": {
                      "type": "short",
                      "value": 257
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 32
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 2
                    },
                    "id": {
                      "type": "short",
                      "value": 258
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 18
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 3
                    },
                    "id": {
                      "type": "short",
                      "value": 256
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 4
                    },
                    "id": {
                      "type": "short",
                      "value": 359
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 5
                    },
                    "id": {
                      "type": "short",
                      "value": 5
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 6
                    },
                    "id": {
                      "type": "short",
                      "value": 50
                    },
                    "Count": {
                      "type": "byte",
                      "value": 6
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 8
                    },
                    "id": {
                      "type": "short",
                      "value": 320
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 9
                    },
                    "id": {
                      "type": "short",
                      "value": 335
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 10
                    },
                    "id": {
                      "type": "short",
                      "value": 335
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 11
                    },
                    "id": {
                      "type": "short",
                      "value": 335
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 12
                    },
                    "id": {
                      "type": "short",
                      "value": 263
                    },
                    "Count": {
                      "type": "byte",
                      "value": 45
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 13
                    },
                    "id": {
                      "type": "short",
                      "value": 38
                    },
                    "Count": {
                      "type": "byte",
                      "value": 8
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 14
                    },
                    "id": {
                      "type": "short",
                      "value": 264
                    },
                    "Count": {
                      "type": "byte",
                      "value": 6
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 15
                    },
                    "id": {
                      "type": "short",
                      "value": 265
                    },
                    "Count": {
                      "type": "byte",
                      "value": 9
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 16
                    },
                    "id": {
                      "type": "short",
                      "value": 4
                    },
                    "Count": {
                      "type": "byte",
                      "value": 58
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 17
                    },
                    "id": {
                      "type": "short",
                      "value": 320
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 18
                    },
                    "id": {
                      "type": "short",
                      "value": 353
                    },
                    "Count": {
                      "type": "byte",
                      "value": 2
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 19
                    },
                    "id": {
                      "type": "short",
                      "value": 344
                    },
                    "Count": {
                      "type": "byte",
                      "value": 2
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 20
                    },
                    "id": {
                      "type": "short",
                      "value": 353
                    },
                    "Count": {
                      "type": "byte",
                      "value": 2
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 21
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 22
                    },
                    "id": {
                      "type": "short",
                      "value": 295
                    },
                    "Count": {
                      "type": "byte",
                      "value": 5
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 23
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 24
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 25
                    },
                    "id": {
                      "type": "short",
                      "value": 5
                    },
                    "Count": {
                      "type": "byte",
                      "value": 64
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 26
                    },
                    "id": {
                      "type": "short",
                      "value": 320
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 27
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 28
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 29
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 30
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 31
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 32
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 33
                    },
                    "id": {
                      "type": "short",
                      "value": 333
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 34
                    },
                    "id": {
                      "type": "short",
                      "value": 35
                    },
                    "Count": {
                      "type": "byte",
                      "value": 14
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 35
                    },
                    "id": {
                      "type": "short",
                      "value": 320
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 0
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 100
                    },
                    "id": {
                      "type": "short",
                      "value": 309
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 1
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 101
                    },
                    "id": {
                      "type": "short",
                      "value": 308
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 1
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 102
                    },
                    "id": {
                      "type": "short",
                      "value": 307
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 1
                    }
                  },
                  {
                    "Slot": {
                      "type": "byte",
                      "value": 103
                    },
                    "id": {
                      "type": "short",
                      "value": 306
                    },
                    "Count": {
                      "type": "byte",
                      "value": 1
                    },
                    "Damage": {
                      "type": "short",
                      "value": 1
                    }
                  }
                ]
              }
            }
          }
        },
        "SpawnY": {
          "type": "int",
          "value": 64
        },
        "rainTime": {
          "type": "int",
          "value": 59781
        },
        "thunderTime": {
          "type": "int",
          "value": 85398
        },
        "SpawnZ": {
          "type": "int",
          "value": 10
        },
        "SpawnX": {
          "type": "int",
          "value": -9
        },
        "raining": {
          "type": "byte",
          "value": 0
        },
        "Time": {
          "type": "long",
          "value": [
            0,
            120080
          ]
        },
        "thundering": {
          "type": "byte",
          "value": 0
        },
        "version": {
          "type": "int",
          "value": 19132
        },
        "LastPlayed": {
          "type": "long",
          "value": [
            401,
            -1405959871
          ]
        },
        "LevelName": {
          "type": "string",
          "value": "Farlands or Cry | Edge -X"
        },
        "SizeOnDisk": {
          "type": "long",
          "value": [
            0,
            9580544
          ]
        }
      }
    }
  }
}

I have tried parsing it but I honestly don’t know what I am doing