title: How to know data coming from JSON is a Float or an Integer in Swift 3?
body: <p>I am getting data from Json and displaying it in table view how to check whether the number is float or double or integer in swift 3 if it is float how to get the no.of digits after decimal can anyone help me how to implement this in swift 3 ?</p>
  
  <pre><code>                    if specialLoop.attributeCode == "special_price" {
                          let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: "$ \((arr.price))")
                          attributeString.addAttribute(NSStrikethroughStyleAttributeName, value: 1, range: NSMakeRange(0, attributeString.length))
                          let specialPrice = specialLoop.value.replacingOccurrences(of: ".0000", with: "0")
                          print(specialPrice)
                          cell.productPrice.text = "$ \(specialPrice)"
                          cell.specialPriceLabel.isHidden = false
                          cell.specialPriceLabel.attributedText = attributeString
                          break
                       }
                       else {
                          cell.specialPriceLabel.isHidden = true
                          let price = arr.price
                          print(price)
                          cell.productPrice.text = "$ \( (price))0"
                      }
  </code></pre>