I've implemented a table can get a list of orders.
I need to figure out how to pick and rename a value. In this case:
1) Call a data using $.http and I got response data:
{
"orders":[
{
"created_at_format":"24 October 2015",
"client":"Jason ",
},
{
"created_at_format":"25 October 2015",
"client":"Jason ",
},
{
"created_at_format":"29 October 2015",
"client":"Jason ",
},
{
"created_at_format":"30 October 2015",
"client":"Jason ",
}
]
}
2) I've done a setup and controller that assigns $scope to response.orders as $scope.list.
3) I made HTML with ng-repeat to render in following snippet:
<div ng-app="order_table" ng-controller="list">
<table>
<tbody>
<tr ng-repeat="x in list">
<td>{{ x.client}}</td>
<td>{{ x.created_at_format}}</td>
</tr>
</tbody>
</table>
</div>
It works fine but I need to know how to replace a word each value of {{ x.created_at_format}} like:
"24 October 2015" to "24 de Octubre de 2015"
To meet the condition to pick different month and rename.