Comments (3)
As discusses, we're gonna define the key and item type like this:
{
permissions: {
type: Map,
itemType: { key: String, value: Permission }
}
}
from structure.
This would be an excellent feature. We are currently working with DynamoDB and we often bump into cases where we want objects with dynamic property naming. This is an excelent use case for saving dictionaries and/or hashtables.
Both JavaScript and DynamoDB supports this use scenario and it would be a great addition to structure.
from structure.
Where the value of key
is a property on Permission
? e.g.
permissions: {
type: Map,
itemType: { key: 'permissionId', value: Permission }
}
Or does this mean that keys will be coerced to a string?
from structure.
Related Issues (20)
- Nested dynamics types isn't work HOT 2
- Getters / attributes not serialized HOT 2
- Apply other validations over arrays
- problem with new js debugger vscode HOT 1
- Question: How to validate object keys?
- Schema subclass loses validate method HOT 2
- [Feature Proposal] Allow users to extend default options HOT 3
- Get other attribute value from a function called within a default value HOT 3
- Improve .eslintrc
- Add complexity checking to ESLint
- Custom validation message HOT 1
- Empty String Converted to 0 and returns Valid HOT 2
- validation for specific attribute
- custom validation HOT 1
- option to override property on validation HOT 4
- Dynamics Defaults Values aren't working HOT 1
- Allow custom toJSON method on class for serialization. HOT 4
- Method to clone an existing structure. HOT 1
- Class constructor HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from structure.