{
  "main": "main.dwl",
  "inputs": {
    "payload": {
      "value": "ewogICJpZCI6ICJjYzQ1MGNhOC1jMWJlLTRkMjQtYjVmZi00MmY3ZWRjZmRlMGUiLAogICJsb2FuSWRlbnRpZmllcnMiOiB7CiAgICAicmVmZXJlbmNlTnVtYmVyIjogIjEyMjAxNCIKICB9LAogICJsb2FuVHlwZSI6ICJBVVRPIiwKICAibG9hblB1cnBvc2VUeXBlIjogIlBVUkNIQVNFIiwKICAiYm9ycm93ZXJzIjogWwogICAgewogICAgICAiaWQiOiAiYTM2YjI5NzctYTQ1Yy00YTk2LWE0Y2UtM2VkYjFiYWE0M2RjIiwKICAgICAgInR5cGUiOiAiQk9SUk9XRVIiLAogICAgICAibmFtZSI6IHsKICAgICAgICAiZmlyc3ROYW1lIjogInRlc3QiLAogICAgICAgICJsYXN0TmFtZSI6ICJ0ZXN0IgogICAgICB9LAogICAgICAiZW1haWwiOiAiY2hpbnRhbWFuK3Rlc3QxMjM2NkBibGVuZC5jb20iLAogICAgICAicGhvbmVOdW1iZXJzIjogWwogICAgICAgIHsKICAgICAgICAgICJ0eXBlIjogIkhPTUUiLAogICAgICAgICAgIm51bWJlciI6IDIzMjMyMzIzMjIKICAgICAgICB9CiAgICAgIF0sCiAgICAgICJiaXJ0aERhdGUiOiAiMTk5OS0wMS0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgInNzbiI6ICI0NDUtNDUtNDU0NCIsCiAgICAgICJjaXRpemVuc2hpcFN0YXR1cyI6ICJVU19DSVRJWkVOIiwKICAgICAgInJlc2lkZW5jZXMiOiBbCiAgICAgICAgewogICAgICAgICAgInR5cGUiOiAiTUFJTElORyIsCiAgICAgICAgICAiYWRkcmVzcyI6IHsKICAgICAgICAgICAgInN0cmVldEFkZHJlc3NMaW5lMSI6ICIzMTAwIER1YmxpbiBCb3VsZXZhcmQiLAogICAgICAgICAgICAiY2l0eSI6ICJEdWJsaW4iLAogICAgICAgICAgICAiY291bnR5IjogIkFsYW1lZGEgQ291bnR5IiwKICAgICAgICAgICAgInN0YXRlIjogIkNBIiwKICAgICAgICAgICAgInppcENvZGUiOiAiOTQ1NjgiCiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAidHlwZSI6ICJDVVJSRU5UIiwKICAgICAgICAgICJyZXNpZGVuY3lUeXBlIjogIk9XTiIsCiAgICAgICAgICAiYWRkcmVzcyI6IHsKICAgICAgICAgICAgInN0cmVldEFkZHJlc3NMaW5lMSI6ICIzMTAwIER1YmxpbiBCb3VsZXZhcmQiLAogICAgICAgICAgICAiY2l0eSI6ICJEdWJsaW4iLAogICAgICAgICAgICAiY291bnR5IjogIkFsYW1lZGEgQ291bnR5IiwKICAgICAgICAgICAgInN0YXRlIjogIkNBIiwKICAgICAgICAgICAgInppcENvZGUiOiAiOTQ1NjgiCiAgICAgICAgICB9CiAgICAgICAgfQogICAgICBdLAogICAgICAib3duZWRQcm9wZXJ0aWVzIjogWwogICAgICAgIHsKICAgICAgICAgICJ1c2FnZVR5cGUiOiAiUFJJTUFSWV9SRVNJREVOQ0UiLAogICAgICAgICAgImFkZHJlc3MiOiB7CiAgICAgICAgICAgICJzdHJlZXRBZGRyZXNzTGluZTEiOiAiMzEwMCBEdWJsaW4gQm91bGV2YXJkIiwKICAgICAgICAgICAgImNpdHkiOiAiRHVibGluIiwKICAgICAgICAgICAgImNvdW50eSI6ICJBbGFtZWRhIENvdW50eSIsCiAgICAgICAgICAgICJzdGF0ZSI6ICJDQSIsCiAgICAgICAgICAgICJ6aXBDb2RlIjogIjk0NTY4IgogICAgICAgICAgfQogICAgICAgIH0KICAgICAgXSwKICAgICAgImVtcGxveWVycyI6IFsKICAgICAgICAKICAgICAgXSwKICAgICAgIm90aGVySW5jb21lcyI6IFsKICAgICAgICB7CiAgICAgICAgICAidHlwZSI6ICJCQVNFIiwKICAgICAgICAgICJ5ZWFybHlJbmNvbWUiOiAwCiAgICAgICAgfQogICAgICBdLAogICAgICAibGlhYmlsaXRpZXMiOiBbCiAgICAgICAgCiAgICAgIF0sCiAgICAgICJkZWNsYXJhdGlvbnMiOiBbCiAgICAgICAgewogICAgICAgICAgInR5cGUiOiAiVVNfQ0lUSVpFTiIsCiAgICAgICAgICAiaW5kaWNhdG9yIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgInR5cGUiOiAiVVNfUkVTSURFTlQiLAogICAgICAgICAgImluZGljYXRvciI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAidHlwZSI6ICJOT05fUEVSTUFORU5UX1VTX1JFU0lERU5UIiwKICAgICAgICAgICJpbmRpY2F0b3IiOiB0CiAgICAgICAgfQogICAgICBdCiAgICB9CiAgXSwKICAibG9hbkFtb3VudCI6IDIwMDAsCiAgImxvYW5UZXJtTW9udGhzIjogNjAsCiAgImNvbGxhdGVyYWxzIjogWwogICAgewogICAgICAidHlwZSI6ICJBVVRPIiwKICAgICAgInByaW1hcnkiOiB0cnVlLAogICAgICAidmVoaWNsZSI6IHsKICAgICAgICAiY29uZGl0aW9uIjogIk5FVyIKICAgICAgfQogICAgfQogIF0KfQ==",
      "kind": "binary",
      "properties": {

      },
      "mimeType": "application/json"
    }
  },
  "fs": {
    "main.dwl": "%dw 2.0\noutput application/xml\n\nfun test(data) = payload.borrowers[0].declarations  filter(lower($.'type') == lower(data)) map ((item, index) -> {\n   t : item.indicator default null\n\n})\n---\n\n\nQuestionAnswers : {\n\t\t\t\t\t\t\ttest : test(\"NON_PERMANENT_US_RESIDENT\").t,\n                            \t\t   QuestionAnswer: {\n\t\t\t\t\t\t\t\t\t        ApplicantQuestionID : 69553,\n\t\t\t\t\t\t\t\t\t        Question : \"IS YOUR INCOME LIKELY TO DECLINE IN THE NEXT TWO YEARS?\",\n\t\t\t\t\t\t\t\t\t        Answer : {\n\t\t\t\t\t\t\t\t\t            QuestionID : 10002,\n\t\t\t\t\t\t\t\t\t            isSatisfactory : test(\"income_decline_next_two_years\").t default false,\n\t\t\t\t\t\t\t\t\t            Explanation : \"\",\n\t\t\t\t\t\t\t\t\t            AnswerText : \"Yes\",\n\t\t\t\t\t\t\t\t\t            \n\t\t\t\t\t\t\t\t\t        },\n\t\t\t\t\t\t\t\t\t        Nickname : \"INCOME\"\n\t\t\t\t\t\t\t\t\t    },\n\t\t\t\t\t\t\t\t\t   QuestionAnswer: {\n\t\t\t\t\t\t\t\t\t        ApplicantQuestionID : 69554,\n\t\t\t\t\t\t\t\t\t        Question : \"ARE YOU A PARTY IN A LAWSUIT?\",\n\t\t\t\t\t\t\t\t\t        Answer : {\n\t\t\t\t\t\t\t\t\t            QuestionID : 10007,\n\t\t\t\t\t\t\t\t\t            isSatisfactory : test(\"US_CITIZEN\").t[0] default false,\n\t\t\t\t\t\t\t\t\t            Explanation : \"\",\n\t\t\t\t\t\t\t\t\t            AnswerText : \"Yes\",\n\t\t\t\t\t\t\t\t\t            \n\t\t\t\t\t\t\t\t\t        },\n\t\t\t\t\t\t\t\t\t        Nickname : \"INCOME\"\n\t\t\t\t\t\t\t\t\t    },\n                                        QuestionAnswer: {\n\t\t\t\t\t\t\t\t\t        ApplicantQuestionID : 69557,\n\t\t\t\t\t\t\t\t\t        Question : \"ARE YOU INTERESTED IN GUARANTEED ASSET PROTECTION?\",\n\t\t\t\t\t\t\t\t\t        Answer : {\n\t\t\t\t\t\t\t\t\t            QuestionID : 10010,\n\t\t\t\t\t\t\t\t\t            isSatisfactory : test(\"NON_PERMANENT_US_RESIDENT\").t default false,\n\t\t\t\t\t\t\t\t\t            Explanation : \"\",\n\t\t\t\t\t\t\t\t\t            AnswerText : \"Yes\",\n\t\t\t\t\t\t\t\t\t            \n\t\t\t\t\t\t\t\t\t        },\n\t\t\t\t\t\t\t\t\t        Nickname : \"GAP\"\n\t\t\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t}"
  }
}