i wanted represent first two letters of phone number,i want to get phone numbers first two characters. what i have tried is below Get first two of attribute and find target based on it.
    let object = [
        "key": {
               login-attempt: 1
               name: "ADMIN"
               phone: "0777123456"
            }]
what i have tried is below
object[0].substr(0,2); 
 
     
    