Trying to find the middle initial Jolt configuration. Ask is, i need to consider only first character in Middle name return from Json. Also first character should be Alphabet (either caps or small case), else i need to return null.
M. -> M.
M$ -> M
$M -> null
.M -> null
Mary -> M
1Mary --> null
Input 1:
{
"applicant": {
"firstName": "Mary",
"middleName": "M.",
"lastName": "Coker"
}
}
Input 2:
{
"applicant": {
"firstName": "Mary",
"middleName": "$M",
"lastName": "Coker"
}
}
Desired Output for 1:
{
"applicant": {
"firstName": "Mary",
"middleName": "M",
"lastName": "Coker"
}
}
Desired Output for 2:
{
"applicant": {
"firstName": "Mary",
"middleName": null,
"lastName": "Coker"
}
}
2
Answers
Enjoy 🙂
You can use toLower and toUpper functions those have respectively different impacts for letters which are the first characters of
middleName
s while have no impact on non-alphabetic chars such as