简体   繁体   中英

How to add redirect link in json object in dynamo db

How to add redirect link to particular text in JSON object. For example,

  • My json attribute name is " submissionFailed " and the value is " Submission Failed. Please Contact Company for more information "

  • Here I need to add redirect link " www.google.com " only to the " Contact Company " in the value.

Please check my sample JSON:

 {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New"}, {"value": "Open"}, {"value": "Close"} ] }, "submissonFailed": "Submission Failed. Please Contact Company for more information" }}

How to add link like in json file.

This is not something you add to DynamoDB, this is something you need to do while rendering the data on your client. For example of it's a html webpage using handlebars it would look like:

{"menu": {
  "id": "file",
  "value": "File",
  "popup": {
    "menuitem": [
      {"value": "New"},
      {"value": "Open"},
      {"value": "Close"}
    ]
  },
  "submissonFailed" : "Submission Failed.",
   "url": "https:google.com",
   "company": "contact company"
}}

.

<p>{{ item.submissionFailed }} <a href={{ item.url }}> {{ item.company }}</a>.</p>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM