ruby - Comparing values in two hashes -
i having trouble in comparing values in 2 hashes, getting error "can't convert string integer". first hash has values captured web page using method "capture_page_data(browser)" , second hash has data parsed report.
code looks below:
# open web application # navigate specific page , capture page data loan_data = hash.new loan_data = capture_page_data(browser)
second hash has values captured report generated web application.
code looks below:
@report_data[page] = hash.new # have written logic parse data report hash variable
now trying compare values in theses 2 hashes ensure data in report matching data in application using below code giving me error "can't convert string integer".
loan_data.map{|ld| ld['maincontent_cphcontent_loanoverviewgeneralinfoctrl_lblrelname']} & @report_data.map{|rd| rd['relationship']}
please me out in resolving issue.
regards,
veera.
if inspect ld
variable inside block, find array. can element of ld[0]
or ld[1]
, ld[string]
not make sense , results in exception seeing. ld
array array 2 elements: key , value.
Comments
Post a Comment