Skip to content

WDI-SEA/google-shopping-conditionals-loops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Shopping - Conditionals, Loops, and JSON

We'll be using a file represented as JSON for this assignment. JSON is a standard for formatting data, and it's a common format you'll see throughout your web development career. Even more important will be parsing JSON.

Getting Started

  • Fork and clone this repository to your computer
  • Navigate to project folder
  • Run npm install to install dependencies
  • Look in the starter file in js, called google-shopping.js. We'll be using Node to read the JSON file and access it as a JavaScript object
  • Run the file by typing node js/google-shopping.js into the console. If you get items printing out, you're ready to start on the assignment.
    • Alternatively, you can also create a separate file for each problem.

Deliverables

Use the product search result in your file to find the following results. Note that you may want to comment out your solutions as you solve them, to avoid a mess of output in the terminal.

Remember to type node js/google-shopping.js to run the file.

1.) Go through the items and find all results that have kind of shopping#product. Print the count of these results. Where else is this count information stored in the search results?

2.) Print the title all items with a backorder availability in inventories.

3.) Print the title all items with more than one image link.

4.) Print all "Canon" products in the items (careful with case sensitivity).

5.) Print all items that have an author name of "eBay" and are brand "Canon".

6.) Print all the products with their brand, price, and an image link

Hints


Licensing

  1. All content is licensed under a CC-BY-NC-SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

Releases

No releases published

Packages

No packages published