JSON link: https://dbd.tricky.lol/api/randomperks?role=survivor
I have: $(eval const a=$(urlfetch json LINK); a[0].name;)
gives me: Cannot read properties of undefined (reading ‘name’)
$(eval const a=$(urlfetch json LINK is for sure getting the data
for example:
$(eval const a=$(urlfetch json https://dbd.tricky.lol/api/randomperks?role=survivor); let s = JSON.stringify(a).slice(0, 2); s)
is returning
{"
Data:
{“Resilience”:{“categories”:[“navigation”,“safeguard”,“strategy”],“name”:“Resilience”,“description”:“You are motivated in dire situations. Grants {0}% additional speed when repairing, sabotaging, healing, unhooking, vaulting, cleansing or blessing a Totem, opening exit gates, and unlocking while injured.”,“role”:“survivor”,“character”:null,“tunables”:[[“3”,“6”,“9”]],“modifier”:“Resilience”,“teachable”:0,“image”:“UI/Icons/Perks/iconPerks_resilience.png”},“S34P01”:{“categories”:null,“name”:“Potential Energy”,“description”:“Your arcane abilities have adapted to The Entity’s Realm after centuries of wandering, granting you unprecedented control over its many devices.
After working on a generator for {0} uninterrupted seconds, press the Active Ability Button 2 to activate this perk. When this perk is active, repairing the generator will charge this perk instead of making the generator progress. For each 1.5% of generator repair, the perk will gain 1 token, up to {1} tokens.
While this perk has at least one token and you are working on a generator, you can press the Active Ability Button 2 to consume all the tokens and instantly make the generator progress by 1% for each token. This perk then deactivates.
If you lose a health state while this perk has at least {3} token, the perk will lose all tokens and deactivate. Missing a Skill Check will also result in some tokens lost.”,“role”:“survivor”,“character”:33,“tunables”:[[“12”,“10”,“8”],[“20”],[“1”],[“1”]],“modifier”:“BP_S34P01”,“teachable”:30,“image”:“UI/Icons/Perks/Quantum/iconPerks_PotentialEnergy.png”},“BorrowedTime”:{“categories”:[“safeguard”],“name”:“Borrowed Time”,“description”:“You are fueled by unexpected energy when saving an ally from a hook.
Survivors you unhook:Keep their Endurance status effect for an extra {0} seconds. Keep their movement speed bonus for an extra 10 seconds.
Endurance prevents a Survivor from being downed, inflicting Deep Wound instead.
Deep Wound will put a Survivor in the dying state unless it is mended before the timer runs out.”,“role”:“survivor”,“character”:7,“tunables”:[[“6”,“8”,“10”]],“modifier”:“BorrowedTime”,“teachable”:35,“image”:“UI/Icons/Perks/L4D/iconPerks_borrowedTime.png”},“Ace_In_The_Hole”:{“categories”:[“support”],“name”:“Ace in the Hole”,“description”:“Lady Luck always seems to be throwing something good your way.
When retrieving an item from a chest, there is a {0}% chance that a Very Rare (or lower) add-on will be attached to it.
{1}% chance of finding an add-on of Uncommon rarity (or lower).
When escaping, keep any add-ons your item has.”,“role”:“survivor”,“character”:6,“tunables”:[[“100”],[“10”,“25”,“50”]],“modifier”:“AceInTheHole”,“teachable”:40,“image”:“UI/Icons/Perks/DLC3/iconPerks_aceInTheHole.png”}}