Hi i am working on a Migration project from Spring to Mule .

In Java we have small function like

```
 private String[] getPurpose(loanPurpose){
    String purpose[] = new String[2];
    if ("REFINANCE".equalsIgnoreCase(loanPurpose)) {
        purpose[0] = "Refinance";
        purpose[1] = "Cash-Out";
        return purpose;
    } 
    return null;
}

```

In Mule i am writing it like below .

```
fun getPurpose(data) = 
if(upper("PURCHASE") == data) 
// how i can assign the values in string array and return 

```

[![enter image description here](https://i.stack.imgur.com/eESc1.png)](https://i.stack.imgur.com/eESc1.png)