Data Try

by Roshan Karunarathna

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.1.0/lodash.min.js"></script>
<div>
<h3>This will provide all data for journels by society id</h3><pre id="result1"></pre>
</div>
<div>
<h3>This will provide mapping for each journel with society names</h3><pre id="result2"></pre>
</div>

JavaScript

var data = {
  "users": [
    {
      "id": 1926,
      "username": "[email protected]",
      "firstName": "Test",
      "lastName": "Test",
      "email": "[email protected]",
      "active": 1,
      "internal": true,
      "createdAt": "2023-10-25T14:46:59",
      "userRoles": [
        {
          "id": 11,
          "roleName": "Customer Support",
          "roleType": "internal",
          "roleHelpText": "Wiley user with admin access to user profiles",
          "createdAt": "2017-05-19T17:21:35"
        },
        {
          "id": 12,
          "roleName": "Onboarding Specialist",
          "roleType": "internal",
          "roleHelpText": "Wiley user with access to onboarding functionality, admin access to users and journal information",
          "createdAt": "2017-05-19T17:21:35"
        }
      ],
      "userJournals": [
        {
          "id": 1,
          "journalCode": "JACE",
          "wjiJournalCode": "JACE",
          "journalName": "Journal of the American Ceramic Society",
          "active": 1,
          "societyId": 996,
          "subjectId": null
        },
        {
          "id": 6,
          "journalCode": "JANE",
          "wjiJournalCode": "JANE",
          "journalName": "Journal of Animal Ecology",
          "active": 1,
          "societyId": 1101,
          "subjectId": null
        },
        {
          "id": 7,
          "journalCode": "JANE2",
          "wjiJournalCode": "JANE2",
          "journalName": "Journal of Animal Ecology2",
          "active": 1,
          "societyId": 1101,
          "subjectId": null
        }
      ]
    },
    {
      "id": 1927,
      "username": "[email protected]",
      "firstName": "Test",
      "lastName": "Test",
      "email": "[email protected]",
      "active": 1,
      "internal": true,
      "createdAt": "2023-10-25T14:46:59",
      "userRoles": [
        {
          "id": 11,
          "roleName": "Customer Support",
          "roleType": "internal",
          "roleHelpText": "Wiley user...