I have the following model definition in a loopback project: `
{
"name": "Program",
"base": "PersistedModel",
"properties": {
"sId": {
"type": "string",
"required": true,
"length": 20
},
"Category": {
"type": "string",
"length": 255,
"description": "Category"
},
"ProgramName": {
"type": "string",
"length": 255,
"description": "Program Name"
},
"Program_Status": {
"type": "string",
"length": 255,
"description": "Program Status"
}
},
"validations": [],
"relations": {
"account": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "Account__c",
"primaryKey": "sId"
},
},
"methods": {}
}
`
I want to get value of description defined in field name in any other model. Is there anyway in loopback or express.js to get it?
It's only possible via
javascriptcode. I'm afraid there isn't a way to accessjsonfiles properties from anotherjsonfile.In yourOtherModel.js