Pipe should be used to transform / format a particular value into the
other. You can create a custom pipe to give you the desired functionality,
but it will be an overkill in your situation. A function should be fine in
your case.
On Sunday, August 28, 2016 at 1:32:35 PM UTC-4, Harold Solomon wrote:
>
>
>
> Hello,
>
> I'm trying to retrieve the birthday and gender from this array. I was able
> to get values like title and userid but other fields like gender and
> birthday values. Can this be done via filter or expression? Please help.
>
>
> <div ng-repeat="item in items" ng-controller="FriendItemCtrl" >
>
> iUserId: {{item.iUserId}}<br>
> Title: {{item.sTitle}}<br>
> Birthday: {{item.sTitle | ?}}
> Gender: {{item.sTitle | ?}}
>
> </div>
>
>
> Array Variable :
>
>
>
>
> [
> {
>
>
> "iUserId": 3,
> "sTitle": "Red Horse Beer",
> "profile": {
> "0": {
> "field_id": 3,
> "type": "first_name",
> "label": "First Name",
> "required": 1,
> "current_id": 0,
> "current_value": "Red Horse ",
> "options": []
> },
> "1": {
> "field_id": 4,
> "type": "last_name",
> "label": "Last Name",
> "required": 1,
> "current_id": 0,
> "current_value": "Beer",
> "options": []
> },
> "2": {
> "field_id": 5,
> "type": "gender",
> "label": "Gender",
> "required": 1,
> "current_id": 2,
> "current_value": "Male",
> "options": [
> {
> "id": 2,
> "label": "Male"
> },
> {
> "id": 3,
> "label": "Female"
> }
> ]
> },
> "3": {
> "field_id": 6,
> "type": "birthdate",
> "label": "Birthday",
> "required": 1,
> "current_id": 0,
> "current_value": "2004-1-1",
> "options": []
> },
> "4": {
> "field_id": 13,
> "type": "about_me",
> "label": "About Me",
> "required": 0,
> "current_id": 0,
> "current_value": "",
> "options": []
> },
> "5": {
> "field_id": 9,
> "type": "multi_checkbox",
> "label": "Genre",
> "required": 1,
> "current_id": 0,
> "current_value": null,
> "options": [
> {
> "id": 57,
> "label": "Acoustic"
> },
> {
> "id": 59,
> "label": "Blues"
> },
> {
> "id": 61,
> "label": "Dance"
> },
> {
> "id": 63,
> "label": "Electronic"
> },
> {
> "id": 65,
> "label": "Folk"
> },
> {
> "id": 67,
> "label": "Grunge"
> },
> {
> "id": 69,
> "label": "Hardcore"
> },
> {
> "id": 89,
> "label": "Soul"
> },
> {
> "id": 87,
> "label": "Rock"
> },
> {
> "id": 85,
> "label": "Punk"
> },
> {
> "id": 83,
> "label": "Pop"
> },
> {
> "id": 81,
> "label": "Reggae"
> },
> {
> "id": 79,
> "label": "R&B"
> },
> {
> "id": 77,
> "label": "Metal"
> },
> {
> "id": 75,
> "label": "Jazz"
> },
> {
> "id": 73,
> "label": "Instrumental"
> },
> {
> "id": 71,
> "label": "Hip Hop"
> },
> {
> "id": 91,
> "label": "Ska"
> },
> {
> "id": 93,
> "label": "World"
> }
> ]
> },
> "6": {
> "field_id": 8,
> "type": "text",
> "label": "GPS",
> "required": 1,
> "current_id": 0,
> "current_value": "",
> "options": []
> },
> "id": 3
> },
> },
> {
> "iUserId": 329,
> "sTitle": "Vijae Manlapaz",
> "profile": {
> "0": {
> "field_id": 3,
> "type": "first_name",
> "label": "First Name",
> "required": 1,
> "current_id": 0,
> "current_value": "Vijae",
> "options": []
> },
> "1": {
> "field_id": 4,
> "type": "last_name",
> "label": "Last Name",
> "required": 1,
> "current_id": 0,
> "current_value": "Manlapaz",
> "options": []
> },
> "2": {
> "field_id": 5,
> "type": "gender",
> "label": "Gender",
> "required": 1,
> "current_id": 3,
> "current_value": "Female",
> "options": [
> {
> "id": 2,
> "label": "Male"
> },
> {
> "id": 3,
> "label": "Female"
> }
> ]
> },
> "3": {
> "field_id": 6,
> "type": "birthdate",
> "label": "Birthday",
> "required": 1,
> "current_id": 0,
> "current_value": "1988-11-01",
> "options": []
> },
> "4": {
> "field_id": 8,
> "type": "text",
> "label": "GPS",
> "required": 1,
> "current_id": 0,
> "current_value": "0:8:332:332",
> "options": []
> },
> "id": 329
> },
> }
> ]
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.