Dynamically get Object property from user input

Anyone know how I can do this? I have an Actor (myactor) and I'd like to have an input box which the user can use to refer to any of its properties, by typing in a path (i.e. @data.abilities.str.proficiency). How can I get that property within my script after they type in the box? I'm thinking that I could use Autocomplete Inline Properties, but don't know if that does this.
DT
Daniel Thorp•1,002d ago
🧵 myActor + "['data']" doesn't return myactor['data']. Instead, it returns "myactor['data']"
C
Calego•1,002d ago
helpers - Foundry Virtual Tabletop Developer API
Documentation for the client-side JavaScript API in Foundry Virtual Tabletop.
C
Calego•1,002d ago
Where is your input being created? a Dialog?
DT
Daniel Thorp•1,002d ago
A form application I think that's the solution, thanks!
LTL
Leo The League Lion•1,002d ago
@arcanistzed gave vote LeaguePoints™ to @calego (#1 • 1086)
C
Calego•1,002d ago
The input's value should be available as part of the _updateObject's parameters. One of those is all of the data of all of the nameed inputs in the <form> element of the formAppliation
DT
Daniel Thorp•1,002d ago
I'm going to take a look at how that works in case I ever want to do this outside of Foundry
C
Calego•1,002d ago
Here's similar from lodash: https://lodash.com/docs/4.17.15#get Must easier to read than lodash source: https://youmightnotneed.com/lodash/#get (welcome to recursion. please make yourself welcome to recursion. please make yourself welcome to recursi.....)
DT
Daniel Thorp•1,002d ago
Ah, nice trick with Array reduce
Want results from more Discord servers?
Add your server
More Posts
autopublishI'm trying to use @varriount's AutoPublish, but I keep getting this error. Any ideas?https://github.symlinking foundry.js and vscodeIs this something you were able to do with vscode? I'm trying right now with both WSL2 symlinks and Releases to ChangelogI just automatically made a Changelog by going to https://github.com/arcanistzed/scs/releases and rucodespacesGo to any github repository and press `.` You'll get kicked over to a `github.dev` version of the reequipmentType bonus⚠️ Breaking Changes ⚠️ The `DND5E.equipmentTypes` type of `bonus` has been removed. Any in-world `Scroll Into View troublesAnyone know why `Element.scrollIntoViewIfNeeded()` is working, but `Element.scrollIntoView()` isn't?DevMode Settings Explorer feedbackSo, I'm working on the styling for a little potential addition to Calego's 'Developer Mode' module aOverlay hiding starsHey y'all! I've run into a general CSS/design problem that I'm kinda stumped on solving. In the imagToDontThingswe should have threaded a long time ago I think, whoopsLayer Manipulationpresumably a module doing this would execute on canvasReady or something for every client right?Document TimestampsIs there a way to find the timestamp of the last edit made to a Document?License Property@ghost @flamewave000 @corporat @kakaroto But if we do want to talk Manifest+, we should do that oveTemporary DocumentsIs there a built-in way to create temporary entities? Like entities wich are not stored in the databLogin Via POSTlook at your network tab when you click the join button, you'll see the POST with the data it sends,Crit confirm change targetLooks like Fury merged the thing already, so whatever you do would no longer be relevant for the MR.Actor Sheet ChangesActor Sheet changes: -**NPC, Character**: `systems/dnd5e/templates/actors/parts/actor-warnings.html`Dors projectTo be clear, I'm very open to the feedback that I'm doing something stupid here, hah. This is my firAC MigrationsAs of 1.4.1 there are two migration scripts for AC related changes: 1. The standard Migration Scrip