[JavaScript] map an array of objects to return an array of objects

Recently I hat to create an array of objects from another array of objects to change some property names and to enrich it with some values. To iterate over the array I used the map() function. But when trying to return the new object using the brackets {}, the map function instead expects me trying to write a function… Therefore you need to wrap the return object in ()

const aPersons = [{
  id: 1,
  name: 'max'
}, {
  id: 2,
  name: 'peter'

const aResult = aPersons.map(person => ({ value: person.id, text: person.name, someboolean: true }))

[CAP] Set credentials in package.json via .env


These three entries in a .env file


are equal to line 12, 13, and 14 in this package.json snippet:

    "cds": {
      "ECEmploymentInformation": {
        "kind": "odata-v2",
        "model": "srv/external/ECEmploymentInformation",
        "credentials": {
          "[production]": {
            "destination": "sfsf"
          "[development]": {
            "url": "https://apisalesdemo2.successfactors.eu/odata/v2",
            "authentication": "BasicAuthentication",
            "username": "myUsername",
            "password": "myPassword",

[Mint] Keyboard not recognized after suspend

In January 2020 I bought a Sharkoon PureWriter Keyboard and since then I had the problem that the keyboard got not recognized after my PC (which runs on Linux Mint) was coming back from suspend mode. Back then I couldn’t find a solution and was just hoping that a newer kernel release will fix this problem in the future. But it did not. So today I was searching again and stumbled again across this post, but now I noticed the new answer from April this year. And it finally solved it!


First check with usbreset for the device name and then create the script under the following path:

sudo micro /lib/systemd/system-sleep/reset-keyboard 

case $1 in
    usbreset "USB-HID Keyboard"

And as a last step we make it executable:

sudo chmod +x /lib/systemd/system-sleep/reset-keyboard

[SAPUI5] Parse error message

If the error response is type json:

        oModel.callFunction("/getData", {
          method: "GET",
          urlParameters: {
            ID: myID,
          success: oData => {
          error: oError => MessageBox.error(JSON.parse(oError.responseText).error.message.value)

If the error response is coming from a Gateway and has an XML body (link):