Fetch specific value from AppStore api - json

I have the following problem. When using https://itunes.apple.com/lookup?id=284910350 i get response like this
{
"resultCount":1,
"results": [
{"kind":"software", "features":["iosUniversal"],
"supportedDevices":["iPadMini4G", "iPhone4S",
"iPhone5s", "iPadThirdGen4G", "iPodTouchourthGen",
"iPhone4", "iPad23G", "iPad2Wifi", "iPadFourthGen",
"iPadFourthGen4G", "iPhone-3GS", "iPhone5c", "iPadThirdGen",
"iPadMini", "iPodTouchFifthGen", "iPhone5"], "isGameCenterEnabled":false,
"screenshotUrls":["http://a5.mzstatic.com/us/r30/Purple2/v4/3d/60/77/3d60774b-12f1-3e6b-ae57-28a64e8f1067/screen1136x1136.jpeg",
"http://a3.mzstatic.com/us/r30/Purple/v4/dd/88/1c/dd881c35-51b3-3033-cef2-08b3deebaa87/screen1136x1136.jpeg",
"http://a4.mzstatic.com/us/r30/Purple4/v4/0c/98/a5/0c98a5a2-f13b-9e36-f027-8fe9a54f141e/screen1136x1136.jpeg",
"http://a4.mzstatic.com/us/r30/Purple6/v4/2f/ae/15/2fae15cd-555c-275a-7d59-235fcf402309/screen1136x1136.jpeg"],
"ipadScreenshotUrls":["http://a1.mzstatic.com/us/r30/Purple/v4/fb/b2/2d/fbb22d69-9454-d3a3-dd4d-d555ae7ae85c/screen480x480.jpeg",
"http://a2.mzstatic.com/us/r30/Purple/v4/e4/bc/11/e4bc1125-67e1-4ece-b67e-5d6839b77eee/screen480x480.jpeg",
"http://a4.mzstatic.com/us/r30/Purple6/v4/93/97/b7/9397b7eb-61cb-ae88-c4e3-c8710079c95e/screen480x480.jpeg",
"http://a4.mzstatic.com/us/r30/Purple2/v4/96/da/60/96da606a-90f7-dc96-9a48-a80ead4be3d8/screen480x480.jpeg"],
"artworkUrl60":"http://a1150.phobos.apple.com/us/r30/Purple/v4/d3/38/b6/d338b6ed-cca7-e4e2-7080-e4dbaa6124a8/57.png",
"artworkUrl512":"http://a255.phobos.apple.com/us/r30/Purple4/v4/c6/6c/92/c66c92d2-58eb-60dc-1ab8-d9ac3b980d12/mzl.tdhykqjc.png",
"artistViewUrl":"https://itunes.apple.com/us/artist/yelp/id284910353?uo=4",
"artistId":284910353, "artistName":"Yelp", "price":0.00, "version":"7.9.2",
"description":"Top-ranked Yelp for your iPhone or iPad has over 50 million reviews on businesses
worldwide \u2014 all in the palm of your hand. Whether you are looking for a pizzeria that is open
now or a coffee shop nearby, Yelp is your local guide to finding just the place to eat, shop, drink,
relax, and play.\n\n\u2022 Discover great local businesses.\n\u2022 Search for nearby restaurants,
shops, and services.\n\u2022 Filter search results by neighborhood, distance, rating, price, and what\u2019s
open now.\n\u2022 Read millions of reviews written by a community of active, expert locals.
\n\u2022 Get to know a business through beautiful photos.\n\u2022 Find great Deals offered by your
favorite local businesses.\n\u2022 Look up addresses and phone numbers, call a business, or make reservations
directly from the app.\n\u2022 Write reviews, check-in to businesses, upload photos, and add tips
of your own!",
"currency":"USD",
"genres":["Travel", "Navigation"], "genreIds":["6003", "6010"], "releaseDate":"2008-07-11T07:00:00Z",
"sellerName":"Yelp, Inc.", "bundleId":"com.yelp.yelpiphone", "trackId":284910350, "trackName":"Yelp",
"primaryGenreName":"Travel", "primaryGenreId":6003,
"releaseNotes":"New in v7.9.2:
\n\u2022 Fixed another bug. Boom.\n\nNew in v7.9.1:\n\u2022 Bug fixes and other improvements
\n\nNew in v7.9:\n\u2022 Our iPhone business page has a hot new modern look just in time for the summer.
\n\u2022 Have you ever uploaded a photo that you later regretted? Yup, us too. Now you can delete
these photos straight from your app.", "minimumOsVersion":"6.0", "formattedPrice":"Free", "wrapperType":"software",
"trackCensoredName":"Yelp", "languageCodesISO2A":["NB", "CS", "DA", "NL", "EN", "FI", "FR", "DE", "IT",
"JA", "PL", "PT", "ES", "SV", "TR"], "fileSizeBytes":"30911255", "contentAdvisoryRating":"12+", "averageUserRatingForCurrentVersion":4.0,
"userRatingCountForCurrentVersion":230, "artworkUrl100":"http://a255.phobos.apple.com/us/r30/Purple4/v4/c6/6c/92/c66c92d2-58eb-60dc-1ab8-d9ac3b980d12/mzl.tdhykqjc.png",
"trackViewUrl":"https://itunes.apple.com/us/app/yelp/id284910350?mt=8&uo=4", "trackContentRating":"12+",
"averageUserRating":4.0, "userRatingCount":189759}]
}
is there any chance that i would be able to get using https://itunes.apple.com/lookup?id=284910350 + some extra parameters on changed url result like this:
{
"resultCount":1,
"results": [
{ "price":0.00, "formattedPrice":"Free"}]
}
Because i just need the price and formated price when i provide app ID, so i can reduce data transfering.

Related

Can I get the data and formula for this online calculator?

Google has an estimator for AdSense revenue based on region and industry. It uses a set parameter of 50,000 pageviews per month and outputs an estimate of annual revenue.
In the page code, line 382 is:
<div class="results-numbers" ng-repeat="character in calculatorCtrl.getRevenueValue() track by $index">
I presume the method getRevenueValue() does the calculation by a formula like:
Annual revenue = CPM * (pageviews / month) / 1,000 views * 12 months
where CPM = "cost per mille" = the amount paid per thousand views, and I presume there is a lookup table of CPM values for given region and industry.
Is there a way to confirm that the formula is the one I've assumed above, and is there a way to find the lookup table used for CPM?
I found the answer when I took another look at the page about a week later. It turns out that the lookup table is right there in the page code on line 49:
var CALCULATOR_DATA = [
{"category": "Books \u0026 Literature", "multiplier": "2.16", "region": "Asia and Pacific Countries"},
{"category": "Internet \u0026 Telecom", "multiplier": "11.23", "region": "Asia and Pacific Countries"},
{"category": "Business \u0026 Industrial", "multiplier": "7.59", "region": "South America"},
...
{"category": "Arts \u0026 Entertainment", "multiplier": "3.62", "region": "Europe, Middle East and Africa"}];
The entries appear to be listed in a random order. There are 100 of them: 25 categories and four regions, exactly matching the choices offered in the drop-down lists on the page. The values of multiplier do confirm the formula stated in the question with multiplier = CPM.

Exception: The number of rows in the range must be at least 1

I am having trouble writing my json data to a google sheet - I get the exception "The number of rows in the data does not match the number of rows in the range."
I think the problem is with how the range is set - but I don't know how to fix it. I include a sample of the json data after this script:
function getApi() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Sheet1");
var url = "https://www.lexology.com/api/v1/track/clients/articles?companyId=1013419&limit=100";
var params = {
"contentType": "application/json",
"headers":{"ApiKey": "MYAPIKEY"
},
};
var response = UrlFetchApp.fetch(url, params);
var dataAll = JSON.parse(response.getContentText());
var dataSet = dataAll;
var rows = [],
data;
for (i = 0; i < dataSet.length; i++) {
data = dataSet[i];
rows.push([data.companyID, data.companyName, data.articles ]);
}
Logger.log(dataSet)
dataRange = sheet.getRange(3, 1, rows.length, 3);
dataRange.setValues(rows);
}
The json data looks like this:
{
"companyId": 1013419,
"companyName": "Cisco Systems Inc",
"jurisdictions": [],
"workAreas": [],
"tags": [],
"fromDate": "2021-01-10T00:00:00+00:00",
"toDate": "2021-02-10T00:00:00+00:00",
"articles": [
{
"date": "2021-01-04T00:00:00",
"articleUrl": "https://www.lexology.com/library/detail.aspx?g=253372ab-8cce-47c9-853f-4a9953becc0d",
"title": "USPTO and IMPI Announce Parallel Patent Grant Initiative",
"summary": "Under the terms of the MoU, a parallel patent grant framework was instituted which allowed IMPI to leverage search and examination results from the USPTO when issuing a counterpart Mexican patent.",
"firmName": "Casimir Jones SC",
"topic": null,
"jurisdictions": [
"Mexico",
"USA"
],
"workAreas": [
"Patents"
],
"reads": 3,
"prints": 0,
"authorNameOrPhotoClick": 0,
"articleContentLink": 0,
"forwardedUsingMailTo": 0,
"viewOriginal": 0
},
{
"date": "2020-12-23T00:00:00",
"articleUrl": "https://www.lexology.com/library/detail.aspx?g=2c23065f-8479-4343-a889-2a072465bedc",
"title": "Why Everyone Is Patenting Software Inventions",
"summary": "Finding the correct balance requires the assistance of a patent strategist with knowledge of what the patent examiner is likely to accept, and who is skilled in crafting the patent in a way that covers what competitors will need in order to compete.",
"firmName": "Finnegan, Henderson, Farabow, Garrett & Dunner, LLP",
"topic": null,
"jurisdictions": [
"USA"
],
"workAreas": [
"IT & Data Protection",
"Patents"
],
"reads": 3,
"prints": 0,
"authorNameOrPhotoClick": 0,
"articleContentLink": 0,
"forwardedUsingMailTo": 0,
"viewOriginal": 0
}
............EDIT.........
I have fixed the typos in the code as pointed out, thank you.
The output I am looking for is set out in this sheet:
https://docs.google.com/spreadsheets/d/1c3_7D7KOwzR6mPNhKuCoGMNXODr9zgQG7qLzmpFfq6E/edit#gid=0&range=A1:F16
ALSO - when I do Logger.log(dataAll) it is not empty. I get the following:
12:58:42 AM Info Logging output too large. Truncating output. {workAreas=[], articles=[{jurisdictions=[Mexico, USA], forwardedUsingMailTo=0.0, topic=null, prints=0.0, date=2021-01-04T00:00:00, authorNameOrPhotoClick=0.0, viewOriginal=0.0, workAreas=[Patents], title=USPTO and IMPI Announce Parallel Patent Grant Initiative, firmName=Casimir Jones SC, summary=Under the terms of the MoU, a parallel patent grant framework was instituted which allowed IMPI to leverage search and examination results from the USPTO when issuing a counterpart Mexican patent., reads=3.0, articleContentLink=0.0, articleUrl=https://www.lexology.com/library/detail.aspx?g=253372ab-8cce-47c9-853f-4a9953becc0d}, {articleUrl=https://www.lexology.com/library/detail.aspx?g=2c23065f-8479-4343-a889-2a072465bedc, authorNameOrPhotoClick=0.0, prints=0.0, jurisdictions=[USA], viewOriginal=0.0, topic=null, date=2020-12-23T00:00:00, reads=3.0, firmName=Finnegan, Henderson, Farabow, Garrett & Dunner, LLP, forwardedUsingMailTo=0.0, articleContentLink=0.0, summary=Finding the correct balance requires the assistance of a patent strategist with knowledge of what the patent examiner is likely to accept, and who is skilled in crafting the patent in a way that covers what competitors will need in order to compete., title=Why Everyone Is Patenting Software Inventions, workAreas=[IT & Data Protection, Patents]}, {date=2021-01-12T00:00:00, prints=0.0, reads=3.0, title=Election Ballot Verification - A Patent Subject Matter Eligibility Analysis, summary=v. CLS Bank Int., the court (1) determined that the claims were drawn to an abstract idea of “voting, verifying the vote, and submitting the vote for tabulation” and (2) found “no inventive concept in the claims sufficient to transform them into patent-eligible subject matter.” Recited at a high level of abstraction, the claims at issue before the court included one or more voting stations, each including a computer, a display, a printer, an input device, a ballot scanning machine, and a means for tabulating printed ballots., workAreas=[Litigation, Patents], jurisdictions=[USA], authorNameOrPhotoClick=0.0, forwardedUsingMailTo=0.0, topic=null, viewOriginal=0.0, articleContentLink=0.0, articleUrl=https://www.lexology.com/library/detail.aspx?g=544fc695-b8eb-4951-a19e-c2df4b7039b6, firmName=Baker & Hostetler LLP}, {authorNameOrPhotoClick=0.0, topic=null, forwardedUsingMailTo=0.0, date=2021-02-04T00:00:00, reads=3.0, articleUrl=https://www.lexology.com/library/detail.aspx?g=64b1aa84-d37f-4e80-9805-3509b48c1824, workAreas=[IT & Data Protection, Litigation], jurisdictions=[USA], title=Successful Dismissal of PayPal Class Action Over Breach Disclosures Serves as Risks Reminder, summary=Companies should consult closely with counsel when making a public announcement regarding a potential or confirmed data security incident to ensure they are thinking through the potential regulatory and litigation risks, whether a trading blackout period is appropriate during the period of investigation, and whether existing cybersecurity risk disclosures in the company’s public filings should be amended., firmName=Sheppard Mullin Richter & Hampton LLP, articleContentLink=0.0, prints=0.0, viewOriginal=0.0}, {topic=null, firmName=Wilmer Cutler Pickering Hale and Dorr LLP, articleUrl=https://www.lexology.com/library/detail.aspx?g=6cad7e90-ff4a-413f-9a4d-079a23c12a44, prints=0.0, reads=3.0, date=2020-12-22T00:00:00, title=Quick Takeaways: SolarWinds Cybersecurity Incident, viewOriginal=0.0, authorNameOrPhotoClick=0.0, articleContentLink=0.0, forwardedUsingMailTo=0.0, workAreas=[IT & Data Protection], summary=Certain versions of SolarWinds software updates that assist organizations in managing their computer networks were compromised by what some officials, such as the US Secretary of State and the US Attorney General, have indicated is a Russian intelligence agency., jurisdictions=[USA]}, {firmName=Reed Smith LLP, forwardedUsingMailTo=0.0, authorNameOrPhotoClick=0.0, summary=The Guidelines set out the law applicable to operations consisting in reading or writing data on users’ devices and clarify the CNIL’s approach, while the Recommendation aims to guide organisations in their compliance efforts by providing examples of practical methods that can be used, notably to collect consent., date=2021-01-22T00:00:00, title=Adtech regulatory round-up January 2021, articleUrl=https://www.lexology.com/library/detail.aspx?g=8973269a-306a-48d3-9b19-0e50a6647d96, articleContentLink=0.0, viewOriginal=1.0, jurisdictions=[Germany, France, United Kingdom, USA], topic=null, workAreas=[IT & Data Protection, Litigation], reads=3.0, prints=0.0}, {firmName=Sheppard Mullin Richter & Hampton LLP, reads=3.0, articleUrl=https://www.lexology.com/library/detail.aspx?g=8e3a8f46-982e-41ba-a4bc-9e8af57ac7db, forwardedUsingMailTo=0.0, summary=The second carve-out from the definition of protected information was for information known to the employee before he joined TGS, “as evidenced by Employee’s written records.” The Brown court took a particularly dim view of this exception, because it would mean that information which, by definition was not confidential before Brown began working at TSG, would become so unless Brown had written records proving he knew of it beforehand., authorNameOrPhotoClick=0.0, title=California Court Strikes Down Overbroad Confidentiality Agreement as a de facto Non-Compete, articleContentLink=0.0, prints=0.0, topic=null, viewOriginal=0.0, date=2021-01-05T00:00:00, workAreas=[Employment & Labor, Litigation], jurisdictions=[USA]},
Issue:
Apparently you can't get a range with 0 rows. In this method getRange(row, column, numRows, numColumns), every parameter should be a number larger than 0.
Why is rows.length 0?
The issue has to do with the fact that your JSON dataSet is not an array, therefore the for loop is terminated because dataSet.length is undefined. As a result row.length is zero because no values were added.
Updated Solution:
Assuming the first row (headers) in your sheet is:
companyId companyName articles.date articles.articleUrl articles.title articles.summary
function getApi() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName("Sheet1");
const url = "https://www.lexology.com/api/v1/track/clients/articles?companyId=1013419&limit=100";
const params = {
"contentType": "application/json",
"headers":{"ApiKey": "MYAPIKEY"
},
};
const response = UrlFetchApp.fetch(url, params);
const dataSet = JSON.parse(response.getContentText());
const data =
dataSet.articles.map((r,i)=>
i==0?[dataSet.companyId,dataSet.companyName,r.date,r.articleUrl,r.title,r.summary]:
["","",r.date,r.articleUrl,r.title,r.summary]
);
sheet.getRange(sheet.getLastRow()+1,1,data.length,data[0].length).setValues(data);
}
The simplest solution is to move the line from fig1the line under the first row to fig2the line under the second row. It works for me!

In Order to Call an API for Current Weather for a Particular City, How Do I Find a City ID from "city.list.json.gz"?

I'm using openweathermap.org to enable me to create the API call to get my weather app to work, but I'm having total trouble trying to find the ID for my city from the information giving at openweathermap.org, which says, "Call API by city ID instead of city name, city coordinates or zip code. In this case you get precise respond exactly for your city. The cities' IDs can be found in the following file: Cities' IDs list.
Clicking on that link causes a file named city.list.json.gz to be automatically downloaded. When I open this file with my Sublime3 Text editor, all I get is huge list of columns of numbers that look like this:
1f8b 0808 30a1 f458 0003 6369 7479 2e6c
6973 742e 6a73 6f6e 00ac bd4b 6f24 5996
1eb8 9f5f e1e8 8d5a 40d3 e7be 1fb3 2319
afcc 78b1 82cc 0865 ceea 92b4 a05b d069
c632 7763 1443 10d0 d5c0 60a0 4563 b66a
6dba f500 a673 0a02 4668 4168 48da 3173
377f a2fb 97cc 39e6 9111 5976 0eef b536
2a0a 1999 e589 48ff 78ef b9e7 7dbe f3bf
ff2f 8bc5 bf84 bf16 8b3f a9cf ffe4 7f5b
78e1 8313 7fb6 fba4 4957 157c f627 cffa
..........................................
Where do I find my city ID in this? Or is my editor not the appropriate software to open this file with?
Try, please, another programm to open it. I' ve opened this file by Windows10 Code Writer app and see json data like
{
"id": 707860,
"name": "Hurzuf",
"country": "UA",
"coord": {
"lon": 34.283333,
"lat": 44.549999
}
},
and so on

why i cannot read json data by using keys instead of indexes angular 2?

I am currently working in angular 2 and receiving my json data through api. i received that data in following format.
{
"totalItems": 2719,
"totalPages": 272,
"results": [
{
"SNR_Title": "Acer - 11 11.6\" Refurbished Chromebook - Intel Celeron - 4GB Memory - 16GB eMMC Flash Memory - Gray",
"SNR_Brand": "Acer",
"SNR_Description": "Refurbished Acer 11 Chromebook: Slip the Acer Chromebook into your bag and work from anywhere, without recharging, because it has enough battery life to last for a long time on a single charge. Learn more about refurbished products › Learn more about Chromebooks ›",
"SNR_ImageURL": "https://img.bbystatic.com/BestBuy_US/images/products/5676/5676707_sa.jpg",
"SNR_ModelNo": "NX.GC1AA.002",
"SNR_UPC": "841631108389",
"SNR_SKU": "5676707",
"SNR_ProductURL": "https://api.bestbuy.com/click/-/5676707/pdp",
"SNR_Price": "169.99",
"SNR_Available": "BESTBUY"
},
{
"SNR_Title": "Acer - 11.6\" Chromebook - Intel Celeron - 2GB Memory - 16GB eMMC Flash Memory - White",
"SNR_Brand": "Acer",
"SNR_Description": "Acer Chromebook: Browse the Internet and tackle work or school projects with this Acer Chromebook. An 11.6-inch LED backlit display and an Intel HD graphics card provide a rich viewing experience for images and video, and a built-in webcam lets you place video calls with crisp clarity. With its compact size and 9-hour battery life, this Acer Chromebook is ideal for travel. Learn more about Chromebooks ›",
"SNR_ImageURL": "https://img.bbystatic.com/BestBuy_US/images/products/4963/4963801_sa.jpg",
"SNR_ModelNo": "CB3131C3SZ",
"SNR_UPC": "888863408634",
"SNR_SKU": "4963801",
"SNR_ProductURL": "https://api.bestbuy.com/click/-/4963801/pdp",
"SNR_Price": "179.0",
"SNR_Available": "BESTBUY"
}
]
}
and my service or .ts class where i am receiving this look like this.
GetAllMobile:Object
constructor(private httpService: HttpService) {
this.httpService.getAllMobiles(1).subscribe(
data => {
const myArray = [];
for (let key in data) {
myArray.push(data[key]);
// console.log(this.GetAllMobile)
}
this.GetAllMobile=(myArray)
}
);
but i cannot read GetAllMobile.results in my html but i can access it by using index like GetAllMobile[2].
what i have tried so far is following.
//Not worked
<div *ngFor="let item of GetAllMobile">
<h2>
Total {{item.totalItems}} {{item.totalPages}} AMAD
</h2>
<div *ngFor="let x of item.results">
<p>
{{x.SNR_Title}}
</p>
</div>
</div>
//this woked but i don't needed this approach
<div *ngFor="let mobile of GetAllMobile[2]">
<h2>{{ mobile.SNR_Title}}</h2>
</div>
but i can read by using indexes. but for some reasons i want to read data by key. can some body tell me what is right approach to read this data in angular 2.
any help or suggestions are highly appreciated.
You are trying to over complicate things a bit :)
You can just assign the response you are getting as is, no need to try and loop it. So just do:
this.httpService.getAllMobiles(1).subscribe(data => {
this.GetAllMobiles = data;
})
Then your template would look like the following. Notice that we are removing the first iteration, since there is nothing to iterate. GetAllMobile is an object. The second iteration we keep, as you want to iterate the results array that is inside your object.
<h2>Total {{GetAllMobile?.totalItems}} {{GetAllMobile?.totalPages}} AMAD</h2>
<div *ngFor="let x of GetAllMobile?.results">
<p>{{x.SNR_Title}}</p>
</div>
Notice the use of safe navigation operator. It safeguards null and undefined property paths. Since data is coming asyncronously it is good to use the safe nav operator. In this case this can also be solved by just initializing the variable GetAllMobile, but it's useful to know about the safe nav operator in the magical asynchronous world :)
Finally, here's a DEMO
try to declare GetAllMobile like this :
GetAllMobile : Array<{totalItems: String, totalPages: string,results: Array<any>}>;
hope this will helps you :)

Not getting display as a list from json file

I am new to ionic framework and I had stuck in the following issue :
data.json:
{ "speakers" : [
{
"name":"Mr Bellingham",
"shortname":"Barot_Bellingham",
"reknown":"Royal Academy of Painting and Sculpture",
"bio":"Barot has just finished his final year at The Royal Academy of Painting and Sculpture, where he excelled in glass etching paintings and portraiture. Hailed as one of the most diverse artists of his generation, Barot is equally as skilled with watercolors as he is with oils, and is just as well-balanced in different subject areas. Barot's collection entitled \"The Un-Collection\" will adorn the walls of Gilbert Hall, depicting his range of skills and sensibilities - all of them, uniquely Barot, yet undeniably different"
},
{
"name":"Jonathan G. Ferrar II",
"shortname":"Jonathan_Ferrar",
"reknown":"Artist to Watch in 2012",
"bio":"The Artist to Watch in 2012 by the London Review, Johnathan has already sold one of the highest priced-commissions paid to an art student, ever on record. The piece, entitled Gratitude Resort, a work in oil and mixed media, was sold for $750,000 and Jonathan donated all the proceeds to Art for Peace, an organization that provides college art scholarships for creative children in developing nations"
},
{
"name":"Hillary Hewitt Goldwynn-Post",
"shortname":"Hillary_Goldwynn",
"reknown":"New York University",
"bio":"Hillary is a sophomore art sculpture student at New York University, and has already won all the major international prizes for new sculptors, including the Divinity Circle, the International Sculptor's Medal, and the Academy of Paris Award. Hillary's CAC exhibit features 25 abstract watercolor paintings that contain only water images including waves, deep sea, and river."
},
{
"name":"Hassum Harrod",
"shortname":"Hassum_Harrod",
"reknown":"Art College in New Dehli",
"bio":"The Art College in New Dehli has sponsored Hassum on scholarship for his entire undergraduate career at the university, seeing great promise in his contemporary paintings of landscapes - that use equal parts muted and vibrant tones, and are almost a contradiction in art. Hassum will be speaking on \"The use and absence of color in modern art\" during Thursday's agenda."
},
{
"name":"Jennifer Jerome",
"shortname":"Jennifer_Jerome",
"reknown":"New Orleans, LA",
"bio":"A native of New Orleans, much of Jennifer's work has centered around abstract images that depict flooding and rebuilding, having grown up as a teenager in the post-flood years. Despite the sadness of devastation and lives lost, Jennifer's work also depicts the hope and togetherness of a community that has persevered. Jennifer's exhibit will be discussed during Tuesday's Water in Art theme."
},
{
"name":"LaVonne L. LaRue",
"shortname":"LaVonne_LaRue",
"reknown":"Chicago, IL",
"bio":"LaVonne's giant-sized paintings all around Chicago tell the story of love, nature, and conservation - themes that are central to her heart. LaVonne will share her love and skill of graffiti art on Monday's schedule, as she starts the painting of a 20-foot high wall in the Rousseau Room of Hotel Contempo in front of a standing-room only audience in Art in Unexpected Places."
},
{
"name":"Constance Olivia Smith",
"shortname":"Constance_Smith",
"reknown":"Fullerton-Brighton-Norwell Award",
"bio":"Constance received the Fullerton-Brighton-Norwell Award for Modern Art for her mixed-media image of a tree of life, with jewel-adorned branches depicting the arms of humanity, and precious gemstone-decorated leaves representing the spouting buds of togetherness. The daughter of a New York jeweler, Constance has been salvaging the discarded remnants of her father's jewelry-making since she was five years old, and won the New York State Fair grand prize at the age of 8 years old for a gem-adorned painting of the Manhattan Bridge."
},
{
"name":"Riley Rudolph Rewington",
"shortname":"Riley_Rewington",
"reknown":"Roux Academy of Art, Media, and Design",
"bio":"A first-year student at the Roux Academy of Art, Media, and Design, Riley is already changing the face of modern art at the university. Riley's exquisite abstract pieces have no intention of ever being understood, but instead beg the viewer to dream, create, pretend, and envision with their mind's eye. Riley will be speaking on the \"Art of Abstract\" during Thursday's schedule"
},
{
"name":"Xhou Ta",
"shortname":"Xhou_Ta",
"reknown":"China International Art University",
"bio":"A senior at the China International Art University, Xhou has become well-known for his miniature sculptures, often the size of a rice granule, that are displayed by rear projection of microscope images on canvas. Xhou will discuss the art and science behind his incredibly detailed works of art."
}
]}
app.js :
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
.controller('ListController', ['$scope','$http',function($scope,$http){
$http.get('js/data.json').success(function(data){
$scope.artists = data;
});
}])
index.html :
<ion-content ng-controller="ListController" class="has-subheader">
<ion-list>
<ion-item ng-repeat='item in artists' class="item-thumbnail-left item-text-wrap">
<img src="img/{{item.shortname}}_tn.jpg">
<h2>{{item.shortname}}</h2>
<h3>{{item.reknown}}</h3>
<p>
{{item.bio}}
</p>
</ion-item>
</ion-list>
</ion-content>
As you all can see I am trying to list down the data from data.json file but it does not display any data. On console-Network tab I am able to see it call to data.json file but in html it is unable to display. What I am doing wrong? Please help me on this, thanks in advance
Try like this
ng-repeat='item in artists.speakers'
instead of
ng-repeat='item in artists'