I want to get attribute value of each input field.

```
<input type="text" id="qty" data-id="{{$item->rowid}}" value="{{$item->qty}}">

function goUpdateCart(){

    $('input[type=text]').each(function(){

        alert($('input[type=text]').getAttribute("data-id"));
    })
}

```

My function can't work correctly